Revision 1f0c76cf
Added by Jim Pingle about 14 years ago
etc/inc/upgrade_config.inc | ||
---|---|---|
1262 | 1262 |
unset($config['dnsupdate']); |
1263 | 1263 |
} |
1264 | 1264 |
|
1265 |
if (is_array($config['pppoe'])) { |
|
1265 |
if (is_array($config['pppoe']) && is_array($config['pppoe'][0])) {
|
|
1266 | 1266 |
$pconfig = array(); |
1267 |
$pconfig['username'] = $config['pppoe']['username']; |
|
1268 |
$pconfig['password'] = $config['pppoe']['password']; |
|
1269 |
$pconfig['provider'] = $config['pppoe']['provider']; |
|
1270 |
$pconfig['ondemand'] = isset($config['pppoe']['ondemand']); |
|
1271 |
$pconfig['timeout'] = $config['pppoe']['timeout']; |
|
1267 |
$pconfig['username'] = $config['pppoe'][0]['username'];
|
|
1268 |
$pconfig['password'] = $config['pppoe'][0]['password'];
|
|
1269 |
$pconfig['provider'] = $config['pppoe'][0]['provider'];
|
|
1270 |
$pconfig['ondemand'] = isset($config['pppoe'][0]['ondemand']);
|
|
1271 |
$pconfig['timeout'] = $config['pppoe'][0]['timeout'];
|
|
1272 | 1272 |
unset($config['pppoe']); |
1273 | 1273 |
$config['interfaces']['wan']['pppoe_username'] = $pconfig['username']; |
1274 | 1274 |
$config['interfaces']['wan']['pppoe_password'] = $pconfig['password']; |
Also available in: Unified diff
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.