Actions
Bug #11801
closedPHP error in ``upgrade_212_to_213()`` when upgrading certain IPsec tunnels
Start date:
04/12/2021
Due date:
% Done:
100%
Estimated time:
Plus Target Version:
21.05
Release Notes:
Default
Affected Version:
2.5.x
Affected Architecture:
All
Description
Certain IPsec tunnel configurations fail to upgrade cleanly with the following error:
Fatal error: Uncaught Error: Cannot unset string offsets in /etc/inc/upgrade_config.inc:6437 Stack trace: #0 /etc/inc/config.lib.inc(482): upgrade_212_to_213() #1 /etc/rc.bootup(132): convert_config() #2 {main} thrown in /etc/inc/upgrade_config.inc on line 6437 PHP ERROR: Type: 1, File: /etc/inc/upgrade_config.inc, Line: 6437, Message: Uncaught Error: Cannot unset string offsets in /etc/inc/upgrade_config.inc:6437 Stack trace: #0 /etc/inc/config.lib.inc(482): upgrade_212_to_213() #1 /etc/rc.bootup(132): convert_config() #2 {main} thrown
Appears to be this line:
unset($ph1ent['reauth_enable'], $ph1ent['rekey_enable'], $ph1ent['margintime'], $ph1ent['over_time']);
Separating the test and checking for existence first does not produce an error:
if (isset($ph1ent['reauth_enable'])) {
unset($ph1ent['reauth_enable']);
}
if (isset($ph1ent['rekey_enable'])) {
unset($ph1ent['rekey_enable']);
}
if (isset($ph1ent['margintime'])) {
unset($ph1ent['margintime']);
}
if (isset($ph1ent['over_time'])) {
unset($ph1ent['over_time']);
}
Forum thread: https://forum.netgate.com/topic/162843/upgrade-from-2-4-5-to-21-01-fatal-error-in-upgrade_config
Updated by Jim Pingle over 3 years ago
- Target version changed from CE-Next to 2.6.0
Updated by Jim Pingle over 3 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset a6edfe2763df01132d56199faf9ac1dc99471f1c.
Updated by Jim Pingle over 3 years ago
- Subject changed from PHP error in upgrade_212_to_213() when upgrading certain IPsec tunnels to PHP error in ``upgrade_212_to_213()`` when upgrading certain IPsec tunnels
Updating subject for release notes.
Updated by Jim Pingle over 3 years ago
- Status changed from Feedback to Closed
Should be fine now, if anyone else has a problem, can reopen.
Updated by Jim Pingle over 3 years ago
- Target version changed from 2.6.0 to 2.5.2
Actions