diff options
author | Chris Buechler <cmb@pfsense.org> | 2016-05-06 21:59:31 -0500 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2016-05-06 21:59:31 -0500 |
commit | 17be206e3ef3d4353600c3cda09c41252794918e (patch) | |
tree | 721cd03bc9d4433bf744b1fb5735b8663907ce95 /src/usr/local/www/status_queues.php | |
parent | 8ad194c0261f4a89ca75007ab0759486b07b2cc2 (diff) | |
download | pfsense-17be206e3ef3d4353600c3cda09c41252794918e.zip pfsense-17be206e3ef3d4353600c3cda09c41252794918e.tar.gz |
Don't divide by 0. Ticket #6329
Diffstat (limited to 'src/usr/local/www/status_queues.php')
-rw-r--r-- | src/usr/local/www/status_queues.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usr/local/www/status_queues.php b/src/usr/local/www/status_queues.php index 15baf2d..e27b96f 100644 --- a/src/usr/local/www/status_queues.php +++ b/src/usr/local/www/status_queues.php @@ -121,9 +121,9 @@ if ($_REQUEST['getactivity']) { } $finscript = ""; foreach ($statistics as $q) { - if ($stat_type == "0") { + if ($stat_type == "0" && $bigger_stat != "0") { $packet_s = round(100 * ($q->pps / $bigger_stat), 0); - } else { + } else if ($bigger_stat != "0") { $packet_s = round(100 * ($q->bandwidth / $bigger_stat), 0); } if ($packet_s < 0) { |