diff options
author | Erik Fonnesbeck <efonnes@gmail.com> | 2011-01-25 03:25:23 -0700 |
---|---|---|
committer | Erik Fonnesbeck <efonnes@gmail.com> | 2011-01-25 03:25:23 -0700 |
commit | e0d4f62e3df24141e01a68f95d348a1b37f5135a (patch) | |
tree | 1214c4abb00e88773b0672800e02706af1c2311b | |
parent | 7af18d10dc23084ae8390241c2e9951d530248f7 (diff) | |
download | pfsense-packages-e0d4f62e3df24141e01a68f95d348a1b37f5135a.tar.gz pfsense-packages-e0d4f62e3df24141e01a68f95d348a1b37f5135a.tar.bz2 pfsense-packages-e0d4f62e3df24141e01a68f95d348a1b37f5135a.zip |
Prevent division by zero.
-rw-r--r-- | config/spamd/spamd_gather_stats.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/config/spamd/spamd_gather_stats.php b/config/spamd/spamd_gather_stats.php index a95e2596..2fee6904 100644 --- a/config/spamd/spamd_gather_stats.php +++ b/config/spamd/spamd_gather_stats.php @@ -75,7 +75,10 @@ foreach($connect_times as $c) { echo "N:"; echo $open_connections; echo ":"; -echo round(($average_connect_time / $total_connections)); +if($total_connections == 0) + echo 0; +else + echo round(($average_connect_time / $total_connections)); exit; |