summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-02-10 22:01:19 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-02-10 22:01:19 +0000
commitb7141335bcab62fcb07eefdb71674921c87667f4 (patch)
tree00fa26b25c65a36092530991932712b230f58865 /usr/local
parent935c2c51a0d74abe22ac2522e2ece1fbd6538886 (diff)
downloadpfsense-b7141335bcab62fcb07eefdb71674921c87667f4.zip
pfsense-b7141335bcab62fcb07eefdb71674921c87667f4.tar.gz
Do not process aliases unless one or more is defined.
Diffstat (limited to 'usr/local')
-rwxr-xr-xusr/local/www/firewall_shaper_edit.php20
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;
+ }
}
}
?>
OpenPOWER on IntegriCloud