]> source.dussan.org Git - nextcloud-server.git/commitdiff
filter invalid storages from the mount cache early
authorRobin Appelman <icewind@owncloud.com>
Tue, 2 Feb 2016 17:10:13 +0000 (18:10 +0100)
committerRobin Appelman <icewind@owncloud.com>
Tue, 2 Feb 2016 17:10:13 +0000 (18:10 +0100)
lib/private/files/config/usermountcache.php

index 7d7b03fbc06173a12df9e53a96ae763c9b7e90b0..a2da3e9f528a1f6afd5313792808813406fdee5e 100644 (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) {