mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Fix PPPoE upgrade, the <pppoe> tag is considered an array these days and the upgrade code wasn't treating it properly, accessing it directly instead of using the first entry ([0]). Fixes #1439 - PPPoE credentials upgrade properly now.
This commit is contained in:
parent
46698c3f3c
commit
1f0c76cfd7
@ -1262,13 +1262,13 @@ function upgrade_047_to_048() {
|
||||
unset($config['dnsupdate']);
|
||||
}
|
||||
|
||||
if (is_array($config['pppoe'])) {
|
||||
if (is_array($config['pppoe']) && is_array($config['pppoe'][0])) {
|
||||
$pconfig = array();
|
||||
$pconfig['username'] = $config['pppoe']['username'];
|
||||
$pconfig['password'] = $config['pppoe']['password'];
|
||||
$pconfig['provider'] = $config['pppoe']['provider'];
|
||||
$pconfig['ondemand'] = isset($config['pppoe']['ondemand']);
|
||||
$pconfig['timeout'] = $config['pppoe']['timeout'];
|
||||
$pconfig['username'] = $config['pppoe'][0]['username'];
|
||||
$pconfig['password'] = $config['pppoe'][0]['password'];
|
||||
$pconfig['provider'] = $config['pppoe'][0]['provider'];
|
||||
$pconfig['ondemand'] = isset($config['pppoe'][0]['ondemand']);
|
||||
$pconfig['timeout'] = $config['pppoe'][0]['timeout'];
|
||||
unset($config['pppoe']);
|
||||
$config['interfaces']['wan']['pppoe_username'] = $pconfig['username'];
|
||||
$config['interfaces']['wan']['pppoe_password'] = $pconfig['password'];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user