We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b65a3e commit dd42b6cCopy full SHA for dd42b6c
apps/files_external/lib/Lib/Storage/SFTP.php
@@ -471,10 +471,14 @@ public function stat($path) {
471
try {
472
$stat = $this->getConnection()->stat($this->absPath($path));
473
474
- $mtime = $stat ? (int)$stat['mtime'] : -1;
475
- $size = $stat ? (int)$stat['size'] : 0;
476
-
477
- return ['mtime' => $mtime, 'size' => $size, 'ctime' => -1];
+ $mtime = isset($stat['mtime']) ? (int)$stat['mtime'] : -1;
+ $size = isset($stat['size']) ? (int)$stat['size'] : 0;
+
+ return [
478
+ 'mtime' => $mtime,
479
+ 'size' => $size,
480
+ 'ctime' => -1
481
+ ];
482
} catch (\Exception $e) {
483
return false;
484
}
0 commit comments