aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-09-14 20:24:34 +0200
committerGitHub <noreply@github.com>2024-09-14 20:24:34 +0200
commita8522a7d48fbb1bb1f35544ce4ba2abd8fd8c1bb (patch)
treee2789c48ec9d3cd04950cac069cd1f14b4eacb03
parent0b65a3e762a4b804512871fa653ef2efe3996af8 (diff)
parentdd42b6cdc82db513c4f8eb6603c035c5967ef64e (diff)
downloadnextcloud-server-a8522a7d48fbb1bb1f35544ce4ba2abd8fd8c1bb.tar.gz
nextcloud-server-a8522a7d48fbb1bb1f35544ce4ba2abd8fd8c1bb.zip
Merge pull request #47974 from nextcloud/backport/47968/stable28
-rw-r--r--apps/files_external/lib/Lib/Storage/SFTP.php12
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 a25829d6baf..ac568702a93 100644
--- a/apps/files_external/lib/Lib/Storage/SFTP.php
+++ b/apps/files_external/lib/Lib/Storage/SFTP.php
@@ -471,10 +471,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;
}