Storage: don't throw warnings when a stat fails
This commit is contained in:
parent
6b33a23a51
commit
52dccd4aa1
|
@ -38,7 +38,11 @@ abstract class Common implements \OC\Files\Storage\Storage {
|
||||||
return 0; //by definition
|
return 0; //by definition
|
||||||
} else {
|
} else {
|
||||||
$stat = $this->stat($path);
|
$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) {
|
public function filemtime($path) {
|
||||||
$stat = $this->stat($path);
|
$stat = $this->stat($path);
|
||||||
return $stat['mtime'];
|
if (isset($stat['mtime'])) {
|
||||||
|
return $stat['mtime'];
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function file_get_contents($path) {
|
public function file_get_contents($path) {
|
||||||
|
|
Loading…
Reference in New Issue