summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2008-06-20 17:41:32 +0000
committerChris Buechler <cmb@pfsense.org>2008-06-20 17:41:32 +0000
commit9d55fcde0e8d1d8c8f472d0eeaae59cae0d97559 (patch)
treec04cc0d6803f27bc3717a68bb8c1e65ac1ec9203 /usr
parent8c7b199cc856c17e2f84174291229daf66a679ee (diff)
downloadpfsense-9d55fcde0e8d1d8c8f472d0eeaae59cae0d97559.zip
pfsense-9d55fcde0e8d1d8c8f472d0eeaae59cae0d97559.tar.gz
fix bug if no aliases exist
Ticket #1760
Diffstat (limited to 'usr')
-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 35467ba..bc656b1 100755
--- a/usr/local/www/interfaces_opt.php
+++ b/usr/local/www/interfaces_opt.php
@@ -47,9 +47,10 @@ function remove_bad_chars($string) {
$optcfg = &$config['interfaces']['opt' . $index];
$optcfg['descr'] = remove_bad_chars($optcfg['descr']);
-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