aboutsummaryrefslogtreecommitdiffstats
path: root/config/spamd
diff options
context:
space:
mode:
authorErik Fonnesbeck <efonnes@gmail.com>2011-01-25 03:25:23 -0700
committerErik Fonnesbeck <efonnes@gmail.com>2011-01-25 03:25:23 -0700
commite0d4f62e3df24141e01a68f95d348a1b37f5135a (patch)
tree1214c4abb00e88773b0672800e02706af1c2311b /config/spamd
parent7af18d10dc23084ae8390241c2e9951d530248f7 (diff)
downloadpfsense-packages-e0d4f62e3df24141e01a68f95d348a1b37f5135a.tar.gz
pfsense-packages-e0d4f62e3df24141e01a68f95d348a1b37f5135a.tar.bz2
pfsense-packages-e0d4f62e3df24141e01a68f95d348a1b37f5135a.zip
Prevent division by zero.
Diffstat (limited to 'config/spamd')
-rw-r--r--config/spamd/spamd_gather_stats.php5
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;