diff options
author | Ermal <eri@pfsense.org> | 2011-02-01 19:32:10 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2011-02-01 19:32:10 +0000 |
commit | b0899ee4581548dde8060370a3063ffd18462883 (patch) | |
tree | 4b153446d71972f2d2e0c9356fb2a97d0cf7bd2f /usr/local | |
parent | 4e8c89fdbedce2188da48f8db1c0dfe83df36435 (diff) | |
download | pfsense-b0899ee4581548dde8060370a3063ffd18462883.zip pfsense-b0899ee4581548dde8060370a3063ffd18462883.tar.gz |
Test for arrach before foreach'ing. Reported-by: http://forum.pfsense.org/index.php/topic,32865.0.html
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/firewall_rules.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php index b5a1ce0..cf50140 100755 --- a/usr/local/www/firewall_rules.php +++ b/usr/local/www/firewall_rules.php @@ -162,9 +162,11 @@ if ($config['pptpd']['mode'] == "server") if(have_ruleint_access("pptp")) $iflist['pptp'] = "PPTP VPN"; -foreach ($config['pppoes']['pppoe'] as $pppoes) - if (($pppoes['mode'] == 'server') && have_ruleint_access("pppoe")) - $iflist['pppoe'] = "PPPoE Server"; +if (is_array($config['pppoes']['pppoe'])) { + foreach ($config['pppoes']['pppoe'] as $pppoes) + if (($pppoes['mode'] == 'server') && have_ruleint_access("pppoe")) + $iflist['pppoe'] = "PPPoE Server"; +} /* add ipsec interfaces */ if (isset($config['ipsec']['enable']) || isset($config['ipsec']['mobileclients']['enable'])) |