summaryrefslogtreecommitdiffstats
path: root/usr/local/www/interfaces_opt.php
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2008-06-20 17:51:44 +0000
committerChris Buechler <cmb@pfsense.org>2008-06-20 17:51:44 +0000
commit7b2eccb6ade49263fd1189e9a3b326fd070099bf (patch)
treea192306517a03709d5d1879eb9a1816ff2087896 /usr/local/www/interfaces_opt.php
parent2128f76f426f6954f435a7a019f6c2a364a88c23 (diff)
downloadpfsense-7b2eccb6ade49263fd1189e9a3b326fd070099bf.zip
pfsense-7b2eccb6ade49263fd1189e9a3b326fd070099bf.tar.gz
fix bug if no aliases exist
Ticket #1760
Diffstat (limited to 'usr/local/www/interfaces_opt.php')
-rwxr-xr-xusr/local/www/interfaces_opt.php7
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'];
OpenPOWER on IntegriCloud