PHP 8 /prix/inc/prix.php Line 93 : round(): Argument #1 ($num) must be of type int|float, string given
SPIP 4.1.5 PHP 8 GIT dernier commit
/prix/inc/prix.php Line 93 : round(): Argument #1 (closed) ($num) must be of type int|float, string given
Un floatval pour résoudre (PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8)
- $prix_ht = round($prix_ht, $options['arrondi']);
+ $prix_ht = round(floatval($prix_ht), $options['arrondi']);
Même souci, sauf contre ordre je peux commiter pour aussi,
Warning: A non-numeric value encountered in /prix/inc/prix.php on line 155
$prix = $prix_ht + $taxes_total;
$prix = floatval($prix_ht) + $taxes_total;