Merge pull request #22081 from owncloud/mount-cache-invalid-storage

filter invalid storages from the mount cache early
This commit is contained in:
Thomas Müller 2016-02-03 11:36:04 +01:00
commit 459a12c8b3
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) {