diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-08-20 23:01:23 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-08-20 23:01:23 -0400 |
commit | f8037e90f95c8dd1f93c948921ca0cd211210574 (patch) | |
tree | 1a01cf12a84c755e6b817caf6a5fa929fd7b5662 | |
parent | 6a8b668b0b7878acb17afa44dff09fd3f209c3fe (diff) | |
download | pfsense-f8037e90f95c8dd1f93c948921ca0cd211210574.zip pfsense-f8037e90f95c8dd1f93c948921ca0cd211210574.tar.gz |
Fix Warning: Invalid argument supplied for foreach() in /etc/inc/filter.inc on line 415
-rw-r--r-- | etc/inc/filter.inc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 6b667d0..406af04 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -412,9 +412,11 @@ function filter_generate_aliases() { $aliases .= "{$aliased['name']} = \"<{$aliased['name']}>\"\n"; } else if ($aliased['type'] == "openvpn") { $openvpncfg = array(); - foreach ($config['openvpn']['user'] as $openvpn) + if(foreach ($config['openvpn']['user']) { /* XXX: Check if we have a correct ip? */ - $openvpncfg[$openvpn['name']] = $openvpn['ip']; + foreach ($config['openvpn']['user'] as $openvpn) + $openvpncfg[$openvpn['name']] = $openvpn['ip']; + } $vpn_lines = split("\n", $addrlist); foreach ($vpn_lines as $vpn_line) { $vpn_address_split = split(" ", $vpn_line); |