2
0
forked from Wavyzz/dolibarr

Fix PhanPluginPrintfIncompatibleArgumentType by typing/casting

This commit is contained in:
MDW
2024-03-17 18:19:12 +01:00
parent 25dd2433a1
commit 66e88e123c

View File

@@ -3149,7 +3149,7 @@ function dol_print_date($time, $format = '', $tzoutput = 'auto', $outputlangs =
$dtts = new DateTime();
$dtts->setTimestamp($timetouse);
$dtts->setTimezone($tzo);
$month = $dtts->format("m");
$month = (int) $dtts->format("m");
$month = sprintf("%02d", $month); // $month may be return with format '06' on some installation and '6' on other, so we force it to '06'.
if ($encodetooutput) {
$monthtext = $outputlangs->transnoentities('Month'.$month);