diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-09-14 18:53:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-14 18:53:38 +0200 |
commit | 34d07fee6630477a086091b477597c549162c274 (patch) | |
tree | cec2631a7524915cfc0ef0f607fd1c5216b5b24f | |
parent | a751ff7b93039b9e24e6a29fec50482dd07f7dbf (diff) | |
parent | 07a6fd11d0b68bd35288180cf8aa33c85c5f1d18 (diff) | |
download | nextcloud-server-34d07fee6630477a086091b477597c549162c274.tar.gz nextcloud-server-34d07fee6630477a086091b477597c549162c274.zip |
Merge pull request #47968 from nextcloud/fixKeyExFileExt
-rw-r--r-- | apps/files_external/lib/Lib/Storage/SFTP.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/apps/files_external/lib/Lib/Storage/SFTP.php b/apps/files_external/lib/Lib/Storage/SFTP.php index 1fb6dec671d..acc531341d9 100644 --- a/apps/files_external/lib/Lib/Storage/SFTP.php +++ b/apps/files_external/lib/Lib/Storage/SFTP.php @@ -441,10 +441,14 @@ class SFTP extends Common { try { $stat = $this->getConnection()->stat($this->absPath($path)); - $mtime = $stat ? (int)$stat['mtime'] : -1; - $size = $stat ? (int)$stat['size'] : 0; - - return ['mtime' => $mtime, 'size' => $size, 'ctime' => -1]; + $mtime = isset($stat['mtime']) ? (int)$stat['mtime'] : -1; + $size = isset($stat['size']) ? (int)$stat['size'] : 0; + + return [ + 'mtime' => $mtime, + 'size' => $size, + 'ctime' => -1 + ]; } catch (\Exception $e) { return false; } |