maxxmason Posted October 6, 2015 Share Posted October 6, 2015 Tools.php Hello I am receiving an error message on some of the product pages. Warning: round() expects parameter 2 to be long, string given in /data01/c6968672/public_html/testshop/classes/Tools.php on line 1592 I can solve most things....eventually but this is slightly beyond me. I have attached the Tools.php file if any experts would be kind enough to take a look. Thanks Link to comment Share on other sites More sharing options...
NemoPS Posted October 7, 2015 Share Posted October 7, 2015 We should know what's calling that. You'd need to print out a debug backtrace of that line when the error occurs Link to comment Share on other sites More sharing options...
maxxmason Posted October 7, 2015 Author Share Posted October 7, 2015 Thanks you very replying. I have no idea how to do that lol! but will see if I can find out. Link to comment Share on other sites More sharing options...
BJng Posted October 8, 2015 Share Posted October 8, 2015 Hi, I've got the same problem and get also this message in b.o. Si è verificato un errore del server durante il caricamento delle tabelle: alcune tabelle non hanno potuto essere caricate.Prova ancora ricaricando questa pagina.Se incontri di nuovo questo problema, controlla i logs del tuo server o contatta il tuo fornitore di hosting per avere assistenza. What's happen? Untill yesterday or few days ago everything was ok and no changes has been on my Presta Thanks to all Stefano Link to comment Share on other sites More sharing options...
NemoPS Posted October 9, 2015 Share Posted October 9, 2015 Which table is broken?You should try inspecting the XHR stack in the network tab of the debug console (f12 on chrome). Link to comment Share on other sites More sharing options...
Michel Schoonhoven Posted November 27, 2015 Share Posted November 27, 2015 The Line is related to 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); ----------------------------------- I also have the same problem but can not figure it out myself, very frustrating. Do you know what is caling the issue? Link to comment Share on other sites More sharing options...
NemoPS Posted November 28, 2015 Share Posted November 28, 2015 Can you try dumping $precision? If it's the same error, it's for some reason being passed a string instead of an integer Link to comment Share on other sites More sharing options...
Michel Schoonhoven Posted November 28, 2015 Share Posted November 28, 2015 (edited) You mean delete the $precision out of the peace of code? So that it only contais the $value? My settings in bo for this are set to "classic" by the way. This is the exact line of the error return round($value, $precision); Edited November 28, 2015 by Michel Schoonhoven (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted November 30, 2015 Share Posted November 30, 2015 No I mean dump liked($precision);This will kill the script execution and tell you what that variable is. The error says it's a string 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