Skip to content

Commit 5f28aaa

Browse files
authored
Merge pull request #47975 from nextcloud/backport/47968/stable29
2 parents 250e0a9 + 6168412 commit 5f28aaa

File tree

1 file changed

+8
-4
lines changed
  • apps/files_external/lib/Lib/Storage

1 file changed

+8
-4
lines changed

apps/files_external/lib/Lib/Storage/SFTP.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -471,10 +471,14 @@ public function stat($path) {
471471
try {
472472
$stat = $this->getConnection()->stat($this->absPath($path));
473473

474-
$mtime = $stat ? (int)$stat['mtime'] : -1;
475-
$size = $stat ? (int)$stat['size'] : 0;
476-
477-
return ['mtime' => $mtime, 'size' => $size, 'ctime' => -1];
474+
$mtime = isset($stat['mtime']) ? (int)$stat['mtime'] : -1;
475+
$size = isset($stat['size']) ? (int)$stat['size'] : 0;
476+
477+
return [
478+
'mtime' => $mtime,
479+
'size' => $size,
480+
'ctime' => -1
481+
];
478482
} catch (\Exception $e) {
479483
return false;
480484
}

0 commit comments

Comments
 (0)