Opening post by Deroh Ryumaru
Jun 27th - 17:18:19 PM
The city of Reisenford has error messages like the following "Warning: Division by zero in /var/http://www/vhosts/monbre.com/httpdocs/city.php on line 334".
My cousin was telling me that this is a simple mistake to make (easy to overlook) and that its also an easy fix.
If the variables of the php are $myVar1 and $myVar2, and you want to have :
$myVar3 = $myVar1/$myVar2;
Then instead of simply having the assignment statement you should use an if statement as well. For example,
If($myVar2 < 1)
$myVar3 = 0;
else
$myVar3 = $myVar1/$myVar2;
Hope this helps and you get the bug worked out soon.
My cousin was telling me that this is a simple mistake to make (easy to overlook) and that its also an easy fix.
If the variables of the php are $myVar1 and $myVar2, and you want to have :
$myVar3 = $myVar1/$myVar2;
Then instead of simply having the assignment statement you should use an if statement as well. For example,
If($myVar2 < 1)
$myVar3 = 0;
else
$myVar3 = $myVar1/$myVar2;
Hope this helps and you get the bug worked out soon.
If you wind up living in an illogical world, you must become illogical yourself. If you know your surroundings are of fantasy, you also know that your imagination controls your fate. Be unbreakable.