diff options
author | Chris Buechler <cmb@pfsense.org> | 2008-06-20 17:51:44 +0000 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2008-06-20 17:51:44 +0000 |
commit | 7b2eccb6ade49263fd1189e9a3b326fd070099bf (patch) | |
tree | a192306517a03709d5d1879eb9a1816ff2087896 /usr | |
parent | 2128f76f426f6954f435a7a019f6c2a364a88c23 (diff) | |
download | pfsense-7b2eccb6ade49263fd1189e9a3b326fd070099bf.zip pfsense-7b2eccb6ade49263fd1189e9a3b326fd070099bf.tar.gz |
fix bug if no aliases exist
Ticket #1760
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/interfaces_opt.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr/local/www/interfaces_opt.php b/usr/local/www/interfaces_opt.php index 750411d..b043948 100755 --- a/usr/local/www/interfaces_opt.php +++ b/usr/local/www/interfaces_opt.php @@ -58,9 +58,10 @@ $optcfg['descr'] = remove_bad_chars($optcfg['descr']); if (!is_array($config['aliases']['alias'])) $config['aliases']['alias'] = array(); -foreach($config['aliases']['alias'] as $alias) - if($alias['name'] == $optcfg['descr']) - $input_errors[] = gettext("Sorry, an alias with the name {$optcfg['descr']} already exists."); +if(is_array($config['aliases']['alias'])) + foreach($config['aliases']['alias'] as $alias) + if($alias['name'] == $optcfg['descr']) + $input_errors[] = gettext("Sorry, an alias with the name {$optcfg['descr']} already exists."); $pconfig['descr'] = $optcfg['descr']; $pconfig['bridge'] = $optcfg['bridge']; |