summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2017-01-18 14:49:23 -0500
committerjim-p <jimp@pfsense.org>2017-01-18 14:49:23 -0500
commitffb0c1822875bc0ea1e2b7b73109fa0f97c0b6d2 (patch)
tree2387f12cf29e813c6cd0c9bf6ef31e3867d7c9bc /src/usr
parentb9f18608c59cfaec8cd994b45a8c6a4249fd75aa (diff)
downloadpfsense-ffb0c1822875bc0ea1e2b7b73109fa0f97c0b6d2.zip
pfsense-ffb0c1822875bc0ea1e2b7b73109fa0f97c0b6d2.tar.gz
Protect against forech errors if this function does not return an array. Fixes #7134
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/local/www/widgets/widgets/interface_statistics.widget.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/usr/local/www/widgets/widgets/interface_statistics.widget.php b/src/usr/local/www/widgets/widgets/interface_statistics.widget.php
index d56b10f..8685f6c 100644
--- a/src/usr/local/www/widgets/widgets/interface_statistics.widget.php
+++ b/src/usr/local/www/widgets/widgets/interface_statistics.widget.php
@@ -79,6 +79,9 @@ if ($_REQUEST && $_REQUEST['ajax']) {
);
$ifdescrs = get_configured_interface_with_descr();
+ if (!is_array($ifdescrs)) {
+ $ifdescrs = array();
+ }
$skipinterfaces = explode(",", $user_settings['widgets']['interface_statistics']['iffilter']);
print("<thead>");
@@ -124,6 +127,9 @@ if ($_REQUEST && $_REQUEST['ajax']) {
} else if ($_POST) {
$ifdescrs = get_configured_interface_with_descr();
+ if (!is_array($ifdescrs)) {
+ $ifdescrs = array();
+ }
$validNames = array();
foreach ($ifdescrs as $ifdescr => $ifname) {
OpenPOWER on IntegriCloud