VirtueMart Forum

VirtueMart 2 + 3 + 4 => Installation, Migration & Upgrade => Topic started by: TopPretender on November 27, 2012, 19:06:26 PM

Title: Warning: Division by zero in vmmodel.php line 388
Post by: TopPretender on November 27, 2012, 19:06:26 PM
After upgrading to 2.0.14, there are a few issues.

One is when go to product details page, there is a warning on top of the page

Warning: Division by zero in /home/xxxxx/public_html/beta/administrator/components/com_virtuemart/helpers/vmmodel.php on line 388

That line in the code:    $limitStart = floor($count/$limit);

Does anyone else have the same issue? Thanks!!!
Title: Re: Warning: Division by zero in vmmodel.php line 388
Post by: Milbo on December 03, 2012, 13:17:25 PM
I think your installation did not overwrite all files.

I just checked the code, we have there

if(empty($limit)){
$limit = 1.0;
}
$limitStart = floor($count/$limit);


and I am quite sure that we added this "if empty" months ago, maybe version 2.0.8 or so.