From: Bjoern Schiessle Date: Tue, 6 May 2014 11:56:22 +0000 (+0200) Subject: return size '0' if the trashbin folder doesn't exists yet X-Git-Tag: v7.0.0alpha2~118^2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a7f6a051addf9545c895384e5e295fbfbf8f8df8;p=nextcloud-server.git return size '0' if the trashbin folder doesn't exists yet --- diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php index e95f1b13c37..72b52e716d3 100644 --- a/apps/files_trashbin/lib/trashbin.php +++ b/apps/files_trashbin/lib/trashbin.php @@ -904,12 +904,12 @@ class Trashbin { * get current size of trash bin from a given user * * @param string $user user who owns the trash bin - * @return mixed trash bin size or false if no trash bin size is stored + * @return integer trash bin size */ private static function getTrashbinSize($user) { $view = new \OC\Files\View('/' . $user); $fileInfo = $view->getFileInfo('/files_trashbin'); - return $fileInfo['size']; + return isset($fileInfo['size']) ? $fileInfo['size'] : 0; } /**