]> source.dussan.org Git - nextcloud-server.git/commitdiff
return size '0' if the trashbin folder doesn't exists yet
authorBjoern Schiessle <schiessle@owncloud.com>
Tue, 6 May 2014 11:56:22 +0000 (13:56 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Mon, 2 Jun 2014 16:56:04 +0000 (18:56 +0200)
apps/files_trashbin/lib/trashbin.php

index e95f1b13c37fbfb98dc9226530188860740bb4f2..72b52e716d3d36680b0de793987513e14ca14084 100644 (file)
@@ -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;
        }
 
        /**