Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-02-26 05:53:02 +0400
committerRobin Appelman <icewind@owncloud.com>2013-02-26 05:53:02 +0400
commit52dccd4aa14612ed93f50967e85ed6a0c6e22295 (patch)
tree44951444a282b17c90d20f3be195a373670fa3fc
parent6b33a23a513b612416d8219a516331ffa695efe2 (diff)
Storage: don't throw warnings when a stat fails
-rw-r--r--lib/files/storage/common.php12
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) {