VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: media991 on May 26, 2012, 00:14:31 AM

Title: Error with price display - PHP5.3
Post by: media991 on May 26, 2012, 00:14:31 AM
Hi There,

We are using php5.3 and when we use virtuemart 2.0 we get the following errors appearing when we are viewing the products in a category view.

Warning: number_format() expects parameter 2 to be long, string given in /home/xxxxx/public_html/administrator/components/com_virtuemart/helpers/currencydisplay.php on line 450

Any ideas please?
Title: Re: Error with price display - PHP5.3
Post by: media991 on May 29, 2012, 05:33:31 AM
Hi, Can anyone advise ???
Title: Re: Error with price display - PHP5.3
Post by: jenkinhill on May 29, 2012, 13:34:47 PM
Why not use VM2.0.6?  For warning see http://forum.virtuemart.net/index.php?topic=102555.msg340507#msg340507
Title: Re: Error with price display - PHP5.3
Post by: media991 on May 30, 2012, 05:05:02 AM
Awesome thank you, that seemed to work  :)
Title: Re: Error with price display - PHP5.3
Post by: chantalw on June 01, 2012, 10:11:35 AM
Hi there,

I have the same problem. I use virtuemart 2.0.6 and have turned off error reporting.
But price is still no show and the following warning keeps showing:

Warning: number_format() expects parameter 2 to be long, string given in /home/xxxxxx/public_html/administrator/components/com_virtuemart/helpers/currencydisplay.php on line 338

Can any one advice?
Thanks.
Title: Re: Error with price display - PHP5.3
Post by: Milbo on June 01, 2012, 18:41:16 PM
Just look in the file, find the line and try $res = number_format((float)$nb,(long)$nbDecimal,$this->_decimal,$this->_thousands);