diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-11-14 16:23:50 +0100 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-11-14 16:23:50 +0100 |
commit | 9ba9f9a7dcd7654336fa714cbd178f6a2c1710a8 (patch) | |
tree | ea38b76ffad8bf87890cb6325db30869179f5914 /apps/files_external/lib/Lib/Storage | |
parent | ea377578ad50809c13e792acfa2bc1bd6b94df24 (diff) | |
download | nextcloud-server-9ba9f9a7dcd7654336fa714cbd178f6a2c1710a8.tar.gz nextcloud-server-9ba9f9a7dcd7654336fa714cbd178f6a2c1710a8.zip |
Make sure to not pass null to DateTime::createFromFormat
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/files_external/lib/Lib/Storage')
-rw-r--r-- | apps/files_external/lib/Lib/Storage/FTP.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_external/lib/Lib/Storage/FTP.php b/apps/files_external/lib/Lib/Storage/FTP.php index 0350035a11a..284f438fccd 100644 --- a/apps/files_external/lib/Lib/Storage/FTP.php +++ b/apps/files_external/lib/Lib/Storage/FTP.php @@ -123,7 +123,7 @@ class FTP extends Common { return $item['type'] === 'cdir'; })); if ($currentDir) { - $time = \DateTime::createFromFormat('YmdHis', $currentDir['modify']); + $time = \DateTime::createFromFormat('YmdHis', $currentDir['modify'] ?? ''); if ($time === false) { throw new \Exception("Invalid date format for directory: $currentDir"); } @@ -269,7 +269,7 @@ class FTP extends Common { case 'wb': case 'wb+': $useExisting = false; - // no break + // no break case 'a': case 'ab': case 'r+': |