Post by hbg » Tue May 29, 2012 2:20 pm

Hi, I have been receiving this error for quite some time:-
Division by zero system/library/pagination.php on line 32 which is $num_pages = ceil($total / $limit);

I did make mention of it in a previous post http://forum.opencart.com/viewtopic.php ... 89#p221689

When I did a google search on the error, a number of sites came up.
https://www.google.com.au/search?q=Divi ... iQfhr5CeCg

Any ideas for a solution, or what could be causing this?

It's OC 1.5.1.3

Opencart Version 1.5.1.3
https://www.opencart.homebrewinn.com.au/shop/


User avatar
hbg
Active Member

Posts

Joined
Wed Apr 13, 2011 8:52 am
Location - Newcastle NSW Australia

Post by hbg » Tue May 29, 2012 2:26 pm

I was just checking the revisions and noticed line 25 has changed if (!(int)$this->limit) {
http://code.google.com/p/opencart/sourc ... hp&old=778
I'll backup the error log, clear it and see if it re-occurs.

Opencart Version 1.5.1.3
https://www.opencart.homebrewinn.com.au/shop/


User avatar
hbg
Active Member

Posts

Joined
Wed Apr 13, 2011 8:52 am
Location - Newcastle NSW Australia

Post by hbg » Thu May 31, 2012 10:23 am

It's been nearly 2 days so far, and the error has yet to return. :-)

Opencart Version 1.5.1.3
https://www.opencart.homebrewinn.com.au/shop/


User avatar
hbg
Active Member

Posts

Joined
Wed Apr 13, 2011 8:52 am
Location - Newcastle NSW Australia

Post by skydive74 » Sun Sep 23, 2012 2:25 pm

Hi, I have the same problem. I followed your link to google code but those files were empty. Can you please post your fix to line 32 on here? Thanks alot!!

Newbie

Posts

Joined
Sun Sep 23, 2012 2:23 pm

Post by skydive74 » Sun Sep 23, 2012 2:26 pm

Hi, I have the same problem. I followed your link to google code but the files were empty. Do you mind posting the change you made to line 32 on here? Thanks alot!!

Newbie

Posts

Joined
Sun Sep 23, 2012 2:23 pm

Post by hbg » Thu Oct 18, 2012 6:51 am

Hi, I just followed the link, and yes it is now blank. Sorry.
Original (Line 25-26)
if (!$this->limit) {
$limit = 15;

Revised (which is working for me)
if (!(int)$this->limit) {
$limit = 10;

Opencart Version 1.5.1.3
https://www.opencart.homebrewinn.com.au/shop/


User avatar
hbg
Active Member

Posts

Joined
Wed Apr 13, 2011 8:52 am
Location - Newcastle NSW Australia
Who is online

Users browsing this forum: No registered users and 35 guests