![]() |
Division by zero problem.
I am not a coder so I am hoping someone here can help me with a p[roblem I am having witha module for vbadvanced cmps. I added a "latest links" module and I get was trying to get a rating image to show and I get this error:
Division by zero in /modules/latestlinks.php on line 69 Line 69: Code:
$link['truerating'] = vb_number_format($link['votetotal'] / $link['votenum'], 2); I should mention that this only happens if there is a link with no votes. If a link has a rating the error doesnt show up. |
Simple... if it has no votes, then you are dividing by zero when calculating your average. Try this,
PHP Code:
|
Cool! That seems to have worked. Thanks a lot.
|
All times are GMT. The time now is 02:42 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|