Skip to content

Commit

Permalink
Fix fatal error when stftime format was null
Browse files Browse the repository at this point in the history
Before the polyfill, this would only have returned false. So this is a bc fix.
  • Loading branch information
onli committed Feb 9, 2025
1 parent 7324c9d commit 08f6a0e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/functions.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,11 @@ function serendipity_strftime($format, $timestamp = null, $useOffset = true, $us
} elseif ($useOffset) {
$timestamp = serendipity_serverOffsetHour($timestamp);
}
$out = PHP81_BC\strftime($format, (int)$timestamp);
if ($format == null) {
$out = false;
} else {
$out = PHP81_BC\strftime($format, (int)$timestamp);
}
break;

case 'persian-utf8':
Expand Down

0 comments on commit 08f6a0e

Please sign in to comment.