diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-12-15 17:16:26 -0500 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2012-12-15 17:16:26 -0500 |
commit | 8951769cae5f1acc9b709ac676fffe26513d14f6 (patch) | |
tree | c0c398e3b734ae7cda0a14ced8036d03d315149d | |
parent | cf3665057c0c195bb3a0e2d9f8f8746f5d2f5787 (diff) | |
download | nextcloud-server-8951769cae5f1acc9b709ac676fffe26513d14f6.tar.gz nextcloud-server-8951769cae5f1acc9b709ac676fffe26513d14f6.zip |
Check sub storage isn't null or false
-rw-r--r-- | lib/files/view.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/files/view.php b/lib/files/view.php index 6d917bb585e..592c484a21c 100644 --- a/lib/files/view.php +++ b/lib/files/view.php @@ -697,10 +697,11 @@ class View { $mountPoints = Filesystem::getMountPoints($path); foreach ($mountPoints as $mountPoint) { $subStorage = Filesystem::getStorage($mountPoint); - $subCache = $subStorage->getCache(); - $rootEntry = $subCache->get(''); - - $data['size'] += $rootEntry['size']; + if ($subStorage) { + $subCache = $subStorage->getCache(); + $rootEntry = $subCache->get(''); + $data['size'] += $rootEntry['size']; + } } } |