valetco Posted December 9, 2015 Share Posted December 9, 2015 (edited) J'ai ce message dans la page de détails de mes produits : (version de prestashop 1.6.0.9) Warning: round() expects parameter 2 to be long, string given in /var/www/html/domains/monsite.be/www/classes/Tools.php on line 1592 Warning: round() expects parameter 2 to be long, string given in /var/www/html/domains/monsite.be/www/classes/Tools.php on line 1592 est-ce que quelqu'un a une solution ? D'avance MERCI voici le code : public static function ps_round($value, $precision = 0) { static $method = null; if ($method == null) $method = (int)Configuration::get('PS_PRICE_ROUND_MODE'); if ($method == PS_ROUND_UP) return Tools::ceilf($value, $precision); elseif ($method == PS_ROUND_DOWN) return Tools::floorf($value, $precision); return round($value, $precision); } nous avons mis comme ceci pour ne plus avoir d'erreur... Mais est-ce que quelqu'un sait d'ou cela vient, j'aime pas trop aller dans le code natif de prestashop ... public static function ps_round($value, $precision = 0) { static $method = null; if ($method == null) $method = (int)Configuration::get('PS_PRICE_ROUND_MODE'); if ($method == PS_ROUND_UP) return Tools::ceilf($value, $precision); elseif ($method == PS_ROUND_DOWN) return Tools::floorf($value, $precision); return round($value, 2); } Edited December 9, 2015 by valetco (see edit history) Link to comment Share on other sites More sharing options...
doekia Posted December 9, 2015 Share Posted December 9, 2015 Il manque un cast en float quelque part. Faudra regarder sur place pour trouver le coupable. En attendant si tu désactive le debug, le message va disparaitre. PM moi si tu veux que je piste ce méchant bout de code. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now