diff options
author | Ermal Luçi <eri@pfsense.org> | 2008-06-02 11:05:25 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2008-06-02 11:05:25 +0000 |
commit | 7cfa8f68c6a2ea7c6fe599cd4797993e90d5d2c7 (patch) | |
tree | 5f440bf3cd5c4b245d2294b6d3ee9f4768dbc0d7 /usr | |
parent | 2dead96d5f381fd759f48183ff781cdf05ba38df (diff) | |
download | pfsense-7cfa8f68c6a2ea7c6fe599cd4797993e90d5d2c7.zip pfsense-7cfa8f68c6a2ea7c6fe599cd4797993e90d5d2c7.tar.gz |
Insure that we have an array before foreach on it.
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/interfaces_opt.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr/local/www/interfaces_opt.php b/usr/local/www/interfaces_opt.php index d47664c..750411d 100755 --- a/usr/local/www/interfaces_opt.php +++ b/usr/local/www/interfaces_opt.php @@ -55,6 +55,9 @@ $a_gateways = &$config['gateways']['gateway_item']; $optcfg = &$config['interfaces']['opt' . $index]; $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."); @@ -560,4 +563,4 @@ if ($_POST) { } } -?>
\ No newline at end of file +?> |