summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_rules_edit.php
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2008-02-09 03:48:22 +0000
committerChris Buechler <cmb@pfsense.org>2008-02-09 03:48:22 +0000
commit3d81372f1845ea9c50f9dd26a0f976f1f9641f6b (patch)
treed90c7e820bc05e18a200ebe4d2c51a1648b97a1e /usr/local/www/firewall_rules_edit.php
parentafb16a463489e5c80646cd00c019379b2c0ff1c4 (diff)
downloadpfsense-3d81372f1845ea9c50f9dd26a0f976f1f9641f6b.zip
pfsense-3d81372f1845ea9c50f9dd26a0f976f1f9641f6b.tar.gz
Fix for "Invalid argument supplied for foreach()" on 937
Diffstat (limited to 'usr/local/www/firewall_rules_edit.php')
-rwxr-xr-xusr/local/www/firewall_rules_edit.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index 378c943..840e4e7 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -934,10 +934,13 @@ on another rule.")?>
/* build a list of gateways */
$gateways = array();
$gateways[] = "default"; // default to don't use this feature :)
- foreach($config['gateways']['gateway_item'] as $gw_item) {
- if($gw_item['gateway'] <> "")
- $gateways[] = $gw_item['name'];
+ if (is_array($config['gateways']['gateway_item'])) {
+ foreach($config['gateways']['gateway_item'] as $gw_item) {
+ if($gw_item['gateway'] <> "")
+ $gateways[] = $gw_item['name'];
+ }
}
+
?>
<tr>
<td width="22%" valign="top" class="vncell">Gateway</td>
OpenPOWER on IntegriCloud