PDA

View Full Version : Division by zero and style issue


neverstop
03-06-2011, 05:19 PM
Hi,

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

PitchouneN64ngc
03-07-2011, 01:31 AM
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;
}
else
{
$issue['totalpages'] = ceil($issue['totalnotes'] / $vbulletin->options['pt_notesperpage']);
}