Project

General

Profile

Bug #10580

PHP error when restoring to 2.5.0

Added by Jim Pingle about 1 month ago. Updated about 1 month ago.

Status:
Feedback
Priority:
Normal
Assignee:
Category:
Configuration Upgrade
Target version:
Start date:
05/20/2020
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.5.0
Affected Architecture:

Description

When testing #10458 I tried using a 2.5.0 base to restore a configuration with revision 17.4 containing this IPsec config:

    <ipsec>
        <preferoldsa/>
        <phase1/>
    </ipsec>

The following PHP error resulted (transcribed by hand, so typos are all me):

Warning: Illegal string offset 'protocol' in /etc/inc/upgrade_config.inc on line 5947
Warning: A non-numeric value encountered in /etc/inc/upgrade_config.inc on line 6108
Warning: Illegal string offset 'reauth_time' in /etc/inc/upgrade_config.inc on line 6108
Warning: Illegal string offset 'over_time' in /etc/inc/upgrade_config.inc on line 6109
Fatal error: Uncaught Error: Cannot unset string offsets in /etc/inc/upgrade_config.inc:6125
Stack Trace:
#0 /etc/inc/config.lib.inc(300): upgrade_199_to_200()
#1 /etc/rc.bootup(123): convert_config()
#2 (main)
  thrown in /etc/inc/upgrade_config.inc on line 6125
PHP ERROR: Type 1, File /etc/inc/upgrade_config.inc, Line: 6125, Message: Uncaught Error: Cannot unset string offsets in /etc/inc/upgrade_config.inc:6125

Screencap of console attached.

The first error is actually in upgrade_189_to_190(), the rest are in upgrade_199_to_200().

Selection_219.jpg (280 KB) Selection_219.jpg Jim Pingle, 05/20/2020 03:06 PM

Associated revisions

Revision d2abe7c9 (diff)
Added by Jim Pingle about 1 month ago

Improve handling of an empty IPsec phase1 tag. Fixes #10580

Also fixes another PHP error after config upgrade which behaved in a
similar way.

History

#1 Updated by Jim Pingle about 1 month ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

Also available in: Atom PDF