summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-02-02 18:10:13 +0100
committerRobin Appelman <icewind@owncloud.com>2016-02-02 18:10:13 +0100
commit8a30058f52c7b2074ecb9da40fba622cfd935f2f (patch)
tree453b2a475ced41024bfc03e1297e62361028ec22 /lib
parent0e95b9f2d560f5fc177e672162e995341cfba025 (diff)
downloadnextcloud-server-8a30058f52c7b2074ecb9da40fba622cfd935f2f.tar.gz
nextcloud-server-8a30058f52c7b2074ecb9da40fba622cfd935f2f.zip
filter invalid storages from the mount cache early
Diffstat (limited to 'lib')
-rw-r--r--lib/private/files/config/usermountcache.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/files/config/usermountcache.php b/lib/private/files/config/usermountcache.php
index 7d7b03fbc06..a2da3e9f528 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) {