From 8a30058f52c7b2074ecb9da40fba622cfd935f2f Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 2 Feb 2016 18:10:13 +0100 Subject: [PATCH] filter invalid storages from the mount cache early --- lib/private/files/config/usermountcache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/files/config/usermountcache.php b/lib/private/files/config/usermountcache.php index 7d7b03fbc0..a2da3e9f52 100644 --- a/lib/private/files/config/usermountcache.php +++ b/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) {