UBB.Dev
Posted By: Magicia Division by Zero! - 03/13/2001 3:43 PM
On the latest beta build 5.2b2 you get a division by zero error if you are not logged in and viewing posts. Check it out here
http://boards.world-gaming.cc/php/postlist.php?Cat=&Board=gendisc

Magicia (Site Manager)
http://uwo.world-gaming.cc
Posted By: sixpack69 Re: Division by Zero! - 03/13/2001 4:05 PM
I've left my warnings on for wwwthreads and all sorts of strange stuff got spit out in the form of warnings that I thought were serious (I guess not []/w3timages/icons/wink.gif[/]).

Try turning off the warnings to see if that helps - should be in the php.ini file.

[]/w3timages/icons/smile.gif[/] 6 []/w3timages/icons/frown.gif[/]
Screamers
Posted By: Magicia Re: Division by Zero! - 03/13/2001 11:53 PM
I don't have access to things like that. []/w3timages/icons/frown.gif[/] Also I had never had this problem before and we have been running WWWThreads for about 7 months.

Magicia (Site Manager)
http://uwo.world-gaming.cc
Posted By: Rick Re: Division by Zero! - 03/14/2001 1:06 AM
Hmm, Ok give this a try. Edit postlist.php, line 173 currently looks like this:

if (!$user[U_FlatPosts]) {

Try changing that, to this:

if ($user[U_FlatPosts] < 1) {

Posted By: Magicia Re: Division by Zero! *DELETED* *DELETED* - 03/14/2001 10:53 AM
Post deleted by Magicia
Posted By: Magicia Re: Division by Zero! - 03/14/2001 10:55 AM
I added the change and unfortunetly nothing still get division by zero at line 817.


Magicia (Site Manager)
http://uwo.world-gaming.cc
Posted By: Rick Re: Division by Zero! - 03/14/2001 4:35 PM
Ok, for some reason $user[U_FlatPosts] is getting set to 0 even though it should default to the $theme['flatposts'] setting in theme.inc.php. What do you have for this setting? If you have a positive value then it should be working, but you can try adding this bit of code and it should tell you what it is being set to:

Line 817 of postlist.php you can put this:

echo "user[U_FlatPosts] is $user[U_FlatPosts']";

This should print out that value after the subject. If it is coming up blank or 0 then somehow we have to get it to force a positive value in there because the checks that are supposed to do this are failing.
© UBB.Developers