#10 division by zero + FIX (alpha 0.92)

open
nobody
None
5
2004-08-31
2004-08-31
No

I tried to draw a graph, with only one value

-> this resulted in a could not display error message
-> turned on error_reporting and saw there was a
divions by zero error in line 257

This happens when $max == $min (thus when all the
values are equal, or when there is only one value)

I've replaced line 257 with this:

if ($max != $min)
{
$dy = $height / ($max-$min);
}
else
{
$dy = 1;
}

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks