Skip to content
Snippets Groups Projects
Commit 2b2df1ec authored by Jared Hancock's avatar Jared Hancock
Browse files

oops: Fix date format crash if `intl` extension missing

parent 64824c40
Branches
Tags
No related merge requests found
...@@ -441,9 +441,12 @@ class Format { ...@@ -441,9 +441,12 @@ class Format {
$strftimeFallback, $timezone, $user=false) { $strftimeFallback, $timezone, $user=false) {
global $cfg; global $cfg;
if ($timestamp && $fromDb) { if (!$timestamp)
return '';
if ($fromDb)
$timestamp = Misc::db2gmtime($timestamp); $timestamp = Misc::db2gmtime($timestamp);
}
if (class_exists('IntlDateFormatter')) { if (class_exists('IntlDateFormatter')) {
$formatter = new IntlDateFormatter( $formatter = new IntlDateFormatter(
Internationalization::getCurrentLocale($user), Internationalization::getCurrentLocale($user),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment