From dae51e28a1bcfc57dc8a723e08f5af7c6917b923 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 13 Jul 2023 12:27:07 +0200 Subject: [PATCH] Fix PHP8 warning --- plugins/libcalendaring/libcalendaring.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/libcalendaring/libcalendaring.php b/plugins/libcalendaring/libcalendaring.php index e2de7f2f..a87461e6 100644 --- a/plugins/libcalendaring/libcalendaring.php +++ b/plugins/libcalendaring/libcalendaring.php @@ -1545,6 +1545,10 @@ class libcalendaring extends rcube_plugin */ public static function to_php_date_format($from) { + if (!is_string($from)) { + return ''; + } + // "dd.MM.yyyy HH:mm:ss" => "d.m.Y H:i:s" return strtr(strtr($from, array( 'YYYY' => 'Y', @@ -1581,6 +1585,10 @@ class libcalendaring extends rcube_plugin */ public static function from_php_date_format($from) { + if (!is_string($from)) { + return ''; + } + // "d.m.Y H:i:s" => "dd.MM.yyyy HH:mm:ss" return strtr($from, array( 'y' => 'YY',