filter invalid storages from the mount cache early

remotes/origin/comments-markallread-dav
Robin Appelman 10 years ago
parent 0e95b9f2d5
commit 8a30058f52
  1. 2
      lib/private/files/config/usermountcache.php

@ -74,7 +74,7 @@ class UserMountCache implements IUserMountCache {
public function registerMounts(IUser $user, array $mounts) {
// filter out non-proper storages coming from unit tests
$mounts = array_filter($mounts, function (IMountPoint $mount) {
return $mount->getStorage()->getCache();
return $mount->getStorage() && $mount->getStorage()->getCache();
});
/** @var ICachedMountInfo[] $newMounts */
$newMounts = array_map(function (IMountPoint $mount) use ($user) {

Loading…
Cancel
Save