summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-02-08 21:09:26 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-02-08 21:09:26 +0000
commit10f844c1d389e76cb097407869b52fb6533d55d0 (patch)
tree37c959790a88afb306bff780160f8903b3d6e2bc
parenta200ac937e34b5ced587b72356719b53bb09917c (diff)
downloadpfsense-10f844c1d389e76cb097407869b52fb6533d55d0.zip
pfsense-10f844c1d389e76cb097407869b52fb6533d55d0.tar.gz
Make sure item is an array before comparing using array functions.
-rw-r--r--etc/inc/pfsense-utils.inc12
1 files changed, 7 insertions, 5 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index a06b79e..f3c2a06 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -85,8 +85,9 @@ function have_ruleint_access($if) {
if (isSystemAdmin($HTTP_SERVER_VARS['AUTH_USER']))
return true;
$security_url = "firewall_rules.php?if=". strtolower($if);
- if(in_array($security_url, $allowed))
- return true;
+ if(is_array($allowed))
+ if(in_array($security_url, $allowed))
+ return true;
return false;
}
@@ -2229,8 +2230,9 @@ function display_top_tabs(& $tab_array) {
}
$authorized_text = print_r($allowed, true);
// log_error("comparing " . basename($link) . " {$authorized_text}");
- if (in_array(basename($link), $authorized))
- $tab_temp[] = $ta;
+ if(is_array($authorized))
+ if (in_array(basename($link), $authorized))
+ $tab_temp[] = $ta;
}
unset ($tab_array);
$tab_array = & $tab_temp;
@@ -3934,4 +3936,4 @@ function lookup_gateway_interface_by_name($name) {
}
}
-?>
+?> \ No newline at end of file
OpenPOWER on IntegriCloud