diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2003-09-04 07:14:23 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2003-09-04 07:14:23 +0000 |
| commit | 2fdbb13109f80ea19bf297e5b680991521adfaf1 (patch) | |
| tree | eff3541c5a755070d6192d71fafbbb5e471da39b /frontends/php/include/classes.inc.php | |
| parent | b55cc0638d1016f17d50f266a45eadd9c2c7b2e0 (diff) | |
| download | zabbix-2fdbb13109f80ea19bf297e5b680991521adfaf1.tar.gz zabbix-2fdbb13109f80ea19bf297e5b680991521adfaf1.tar.xz zabbix-2fdbb13109f80ea19bf297e5b680991521adfaf1.zip | |
- fixed division by zero and infinite loop in graphs (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@968 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/classes.inc.php')
| -rw-r--r-- | frontends/php/include/classes.inc.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/frontends/php/include/classes.inc.php b/frontends/php/include/classes.inc.php index 732be9c5..064d32c6 100644 --- a/frontends/php/include/classes.inc.php +++ b/frontends/php/include/classes.inc.php @@ -131,7 +131,11 @@ function setWidth($width) { - $this->sizeX=$width; +// Avoid sizeX==0, to prevent division bu zero later + if($width>0) + { + $this->sizeX=$width; + } } function setHeight($height) |
