diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-02-10 22:01:19 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-02-10 22:01:19 +0000 |
commit | b7141335bcab62fcb07eefdb71674921c87667f4 (patch) | |
tree | 00fa26b25c65a36092530991932712b230f58865 /usr/local | |
parent | 935c2c51a0d74abe22ac2522e2ece1fbd6538886 (diff) | |
download | pfsense-b7141335bcab62fcb07eefdb71674921c87667f4.zip pfsense-b7141335bcab62fcb07eefdb71674921c87667f4.tar.gz |
Do not process aliases unless one or more is defined.
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/firewall_shaper_edit.php | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/usr/local/www/firewall_shaper_edit.php b/usr/local/www/firewall_shaper_edit.php index 5d27a30..a56ec3a 100755 --- a/usr/local/www/firewall_shaper_edit.php +++ b/usr/local/www/firewall_shaper_edit.php @@ -762,15 +762,17 @@ $isfirst = 0; $aliases = ""; $addrisfirst = 0; $aliasesaddr = ""; -foreach($config['aliases']['alias'] as $alias_name) { - if(!stristr($alias_name['address'], ".")) { - if($isfirst == 1) $aliases .= ","; - $aliases .= "'" . $alias_name['name'] . "'"; - $isfirst = 1; - } else { - if($addrisfirst == 1) $aliasesaddr .= ","; - $aliasesaddr .= "'" . $alias_name['name'] . "'"; - $addrisfirst = 1; +if(is_array($config['aliases']['alias'])) { + foreach($config['aliases']['alias'] as $alias_name) { + if(!stristr($alias_name['address'], ".")) { + if($isfirst == 1) $aliases .= ","; + $aliases .= "'" . $alias_name['name'] . "'"; + $isfirst = 1; + } else { + if($addrisfirst == 1) $aliasesaddr .= ","; + $aliasesaddr .= "'" . $alias_name['name'] . "'"; + $addrisfirst = 1; + } } } ?> |