aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-12-15 17:16:26 -0500
committerMichael Gapczynski <mtgap@owncloud.com>2012-12-15 17:16:26 -0500
commit8951769cae5f1acc9b709ac676fffe26513d14f6 (patch)
treec0c398e3b734ae7cda0a14ced8036d03d315149d
parentcf3665057c0c195bb3a0e2d9f8f8746f5d2f5787 (diff)
downloadnextcloud-server-8951769cae5f1acc9b709ac676fffe26513d14f6.tar.gz
nextcloud-server-8951769cae5f1acc9b709ac676fffe26513d14f6.zip
Check sub storage isn't null or false
-rw-r--r--lib/files/view.php9
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'];
+ }
}
}