diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-11-14 16:23:50 +0100 |
---|---|---|
committer | Côme Chilliet (Rebase PR Action) <come-nc@users.noreply.github.com> | 2022-11-15 10:27:47 +0000 |
commit | 058bf13482fd246282408388e1f8a893fdbfd692 (patch) | |
tree | 3b2a894ff67e01bdf682e0585aeda5fb01d860a1 /apps/files_external/lib | |
parent | d207d6ec8212387b663a06624a58551738c4d14a (diff) | |
download | nextcloud-server-058bf13482fd246282408388e1f8a893fdbfd692.tar.gz nextcloud-server-058bf13482fd246282408388e1f8a893fdbfd692.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')
-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 d424ffe3cdd..998d147b7c7 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+': |