View Full Version : Division by zero and style issue

06 Mar 2011, 19:19

On some (not all) project.php?projectid=x pages i get this error:

Warning: Division by zero in [path]/includes/functions_projecttools.php on line 1204

On the pages with that error the style of the page is borked: http://i.imgur.com/DHr8E.jpg should look like this: http://i.imgur.com/invhQ.jpg

Thanks in advance

07 Mar 2011, 03:31
In Project Tools Options, what is the content of the 'Notes Displayed Per Page' option?

It seems 0 is a non-valid value while the option says it is. I will check what could I do.

Can you define '1' for this setting awaiting a fix? Thank you :)

--------------- Added 1299492035 at 1299492035 ---------------

You can try to fix it (not tested as I don't reproduce it actually) by changing the given line in your message error by this code:

if ($vbulletin->options['pt_notesperpage'] == 0)
$issue['totalpages'] = 1;
$issue['totalpages'] = ceil($issue['totalnotes'] / $vbulletin->options['pt_notesperpage']);