diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-01-06 18:35:09 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-01-06 18:35:09 +0100 |
commit | 7528a1a47503e1ced9b5753a38f3624d7059f8d6 (patch) | |
tree | 5a531016a765a71eb286cafec755378ef6490fc2 /lib | |
parent | 47eb0c59e6c1514638cb8695d2b92ff41e4bf2e1 (diff) | |
parent | 64e3ebae74b9f47369b946fbda89a0ce6f6ffe04 (diff) | |
download | nextcloud-server-7528a1a47503e1ced9b5753a38f3624d7059f8d6.tar.gz nextcloud-server-7528a1a47503e1ced9b5753a38f3624d7059f8d6.zip |
Merge pull request #13130 from owncloud/getstoragestats-error-handling
Add error handling to getstoragestats.php
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/helper.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/helper.php b/lib/private/helper.php index fb4ddfae3b7..8e9b7d3b6f3 100644 --- a/lib/private/helper.php +++ b/lib/private/helper.php @@ -905,6 +905,9 @@ class OC_Helper { if (!$rootInfo) { $rootInfo = \OC\Files\Filesystem::getFileInfo($path, false); } + if (!$rootInfo instanceof \OCP\Files\FileInfo) { + throw new \OCP\Files\NotFoundException(); + } $used = $rootInfo->getSize(); if ($used < 0) { $used = 0; |