forked from Wavyzz/dolibarr
Fix: PHP8.1 strftime deprecation -> dol_print_date
# Fix: PHP8.1 strftime deprecation -> dol_print_date Change strftime to dol_print_date to work around deprecation
This commit is contained in:
@@ -2781,7 +2781,7 @@ function dol_format_address($object, $withcountry = 0, $sep = "\n", $outputlangs
|
||||
function dol_strftime($fmt, $ts = false, $is_gmt = false)
|
||||
{
|
||||
if ((abs($ts) <= 0x7FFFFFFF)) { // check if number in 32-bit signed range
|
||||
return ($is_gmt) ? @gmstrftime($fmt, $ts) : @strftime($fmt, $ts);
|
||||
return ($is_gmt) ? @gmstrftime($fmt, $ts) : @dol_print_date($ts, $fmt);
|
||||
} else {
|
||||
return 'Error date into a not supported range';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user