PHP Warning: Division by zero in ~/public_html/forums/cn/template/wind/thread.htm on line 14

[04-Sep-2010 13:46:24] PHP Warning:  Division by zero in ~/public_html/forums/cn/template/wind/thread.htm on line 14

I’ve received this bug. Just make sure the value is not equal to zero, then it won’t be divided by it.

<!--
EOT;
$tmpCount=0;
$idp = 100/$db_txtadnum;
foreach ($arrayAdvert as $value) {

if ($tmpCount==0) {print <<<EOT
-->

change to.

<!--

EOT;
$tmpCount=0;
if ($db_txtadnum != 0) {
$idp = 100/$db_txtadnum;
}
foreach ($arrayAdvert as $value) {
if ($tmpCount==0) {print <<<EOT
-->


Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.