Fix bug where DateTime($date, null) throws an exception (#3965)
This commit is contained in:
parent
ac4f6e7562
commit
fb4f815e53
1 changed files with 1 additions and 1 deletions
|
@ -223,7 +223,7 @@ abstract class kolab_format
|
|||
if ($tz) $datetime->setTimezone($tz);
|
||||
}
|
||||
else if (is_string($datetime) && strlen($datetime)) {
|
||||
$datetime = new DateTime($datetime, $tz ?: null);
|
||||
$datetime = $tz ? new DateTime($datetime, $tz) : new DateTime($datetime);
|
||||
}
|
||||
}
|
||||
catch (Exception $e) {}
|
||||
|
|
Loading…
Add table
Reference in a new issue