aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-09-14 20:24:47 +0200
committerGitHub <noreply@github.com>2024-09-14 20:24:47 +0200
commit5f28aaa6030762f1540c449c59f8c341195110a8 (patch)
treed58402c9e0ca070201d4028677b9a40a1f0e80f1
parent250e0a939d9b9845950c998d0df4b337e78fd635 (diff)
parent61684129e18fa029927fb464d90fa3f398c4f302 (diff)
downloadnextcloud-server-5f28aaa6030762f1540c449c59f8c341195110a8.tar.gz
nextcloud-server-5f28aaa6030762f1540c449c59f8c341195110a8.zip
Merge pull request #47975 from nextcloud/backport/47968/stable29
-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 850525cf6de..7fda192dbfc 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;
}