Fix some PHP8 depreciation

This commit is contained in:
Noizette 2023-04-14 19:48:07 +02:00
parent 8a10dcfab3
commit afedc83193
5 changed files with 45 additions and 40 deletions

View file

@ -59,7 +59,9 @@ $tpl->register_function('money_fac', function (array $params)
$current_value = Utils::money_format($current_value, ',', '');
}
$current_value = htmlspecialchars($current_value, ENT_QUOTES, 'UTF-8');
if (null !== $current_value) {
$current_value = htmlspecialchars($current_value, ENT_QUOTES, 'UTF-8');
}
$currency = Config::getInstance()->get('monnaie');
return sprintf('<td><nobr><input type="text" pattern="[0-9]*([.,][0-9]{1,2})?" inputmode="decimal" size="8" class="money" style="width: 60%%" onchange="updateSum();" name="%s" value="%s" /><b>%s</b></nobr></td>', $name, $current_value, $currency);