summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-08-08 00:40:04 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-08-08 00:40:04 +0000
commitbdf7aa591fe925d04f2b5f7797390d7ed83573b2 (patch)
tree13859ff70f6e35883d8e9ef3825946be2a92c17b /usr/local
parent8bf4fa4a37fac07faf1b57c2440ac3b863725e36 (diff)
downloadpfsense-bdf7aa591fe925d04f2b5f7797390d7ed83573b2.zip
pfsense-bdf7aa591fe925d04f2b5f7797390d7ed83573b2.tar.gz
Only foreach through valid arrays
Diffstat (limited to 'usr/local')
-rwxr-xr-xusr/local/www/firewall_rules.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php
index e219a0a..996864f 100755
--- a/usr/local/www/firewall_rules.php
+++ b/usr/local/www/firewall_rules.php
@@ -55,10 +55,12 @@ if ($config['pppoe']['mode'] == "server")
/* add ipsec filter gif interfaces */
$a_ipsec = &$config['ipsec']['tunnel'];
-$i = 0; foreach ($a_ipsec as $ipsecent) {
- if(isset($ipsecent['creategif'])) {
- $iflist["gif{$i}"] = "{$ipsecent['descr']}";
- $i++;
+if(is_array($a_ipsec)) {
+ $i = 0; foreach ($a_ipsec as $ipsecent) {
+ if(isset($ipsecent['creategif'])) {
+ $iflist["gif{$i}"] = "{$ipsecent['descr']}";
+ $i++;
+ }
}
}
OpenPOWER on IntegriCloud