diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-02-26 02:53:02 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-02-26 02:53:02 +0100 |
commit | 52dccd4aa14612ed93f50967e85ed6a0c6e22295 (patch) | |
tree | 44951444a282b17c90d20f3be195a373670fa3fc /lib | |
parent | 6b33a23a513b612416d8219a516331ffa695efe2 (diff) | |
download | nextcloud-server-52dccd4aa14612ed93f50967e85ed6a0c6e22295.tar.gz nextcloud-server-52dccd4aa14612ed93f50967e85ed6a0c6e22295.zip |
Storage: don't throw warnings when a stat fails
Diffstat (limited to 'lib')
-rw-r--r-- | lib/files/storage/common.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/files/storage/common.php b/lib/files/storage/common.php index 0e596561920..cb41d17e446 100644 --- a/lib/files/storage/common.php +++ b/lib/files/storage/common.php @@ -38,7 +38,11 @@ abstract class Common implements \OC\Files\Storage\Storage { return 0; //by definition } else { $stat = $this->stat($path); - return $stat['size']; + if (isset($stat['size'])) { + return $stat['size']; + } else { + return 0; + } } } @@ -79,7 +83,11 @@ abstract class Common implements \OC\Files\Storage\Storage { public function filemtime($path) { $stat = $this->stat($path); - return $stat['mtime']; + if (isset($stat['mtime'])) { + return $stat['mtime']; + } else { + return 0; + } } public function file_get_contents($path) { |