summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xusr/local/www/interfaces_opt.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/usr/local/www/interfaces_opt.php b/usr/local/www/interfaces_opt.php
index 5bcc65f..5f404ef 100755
--- a/usr/local/www/interfaces_opt.php
+++ b/usr/local/www/interfaces_opt.php
@@ -55,12 +55,10 @@ $a_gateways = &$config['gateways']['gateway_item'];
$optcfg = &$config['interfaces'][$optif];
$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