filter invalid storages from the mount cache early

This commit is contained in:
Robin Appelman 2016-02-02 18:10:13 +01:00
parent 0e95b9f2d5
commit 8a30058f52
1 changed files with 1 additions and 1 deletions

View File

@ -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) {