Fix PHP8 warning
This commit is contained in:
parent
83d5c9f7f5
commit
dae51e28a1
1 changed files with 8 additions and 0 deletions
|
@ -1545,6 +1545,10 @@ class libcalendaring extends rcube_plugin
|
||||||
*/
|
*/
|
||||||
public static function to_php_date_format($from)
|
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"
|
// "dd.MM.yyyy HH:mm:ss" => "d.m.Y H:i:s"
|
||||||
return strtr(strtr($from, array(
|
return strtr(strtr($from, array(
|
||||||
'YYYY' => 'Y',
|
'YYYY' => 'Y',
|
||||||
|
@ -1581,6 +1585,10 @@ class libcalendaring extends rcube_plugin
|
||||||
*/
|
*/
|
||||||
public static function from_php_date_format($from)
|
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"
|
// "d.m.Y H:i:s" => "dd.MM.yyyy HH:mm:ss"
|
||||||
return strtr($from, array(
|
return strtr($from, array(
|
||||||
'y' => 'YY',
|
'y' => 'YY',
|
||||||
|
|
Loading…
Add table
Reference in a new issue