We recently upgraded to 1.7.1+ and are having an odd error when trying to access the Course Categories under Add/Edit Courses in the Admin area.
I get the following error at the top of the page:
Warning: Division by zero in F:\moodle\moodle\lib\weblib.php on line 4904
followed by "Page: (Next)" (next is hyperlinked to the current page)
followed by:
Warning: Division by zero in F:\moodle\moodle\course\category.php on line 299
I am able to edit courses and do everything else I would normally do in this area, but I would really like to know what's going on that is causing the error.
In both places in the source code, there is a reference to something called
"ceil($totalcount / $perpage)"
Line 4904 from weblib.php$lastpage = ceil($totalcount / $perpage);Line 299 from category.php
$atlastpage = (($page + 1) == ceil($totalcount / $perpage));
So I'm thinking that this is causing the problem, but I'm not much of a PHP programmer to do the tracing to see what's the problem.
Any ideas?
thanks,
Jamie