Project

General

Profile

Actions

Bug #15362

open

Config upgrade error with empty gateway interval tags.

Added by Steve Wheeler about 1 month ago. Updated about 1 month ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Upgrade
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
24.07
Release Notes:
Default
Affected Version:
2.7.2
Affected Architecture:
All

Description

Upgrading an old config that has set but empty gateway interval tags throws a php error.
For example a config containing:

        <gateway_item>
            <interface>wan</interface>
            <gateway>1.2.3.4</gateway>
            <name>wan_gateway</name>
            <weight/>
            <interval/>
            <descr><![CDATA[gw1]]></descr>
            <defaultgw/>
        </gateway_item>

Will hit:

Fatal error: Uncaught TypeError: Unsupported operand types: string * int in /etc/inc/upgrade_config.inc:4169
Stack trace:
#0 /etc/inc/config.lib.inc(519): upgrade_130_to_131()
#1 /etc/rc.bootup(140): convert_config()
#2 {main}
 thrown in /etc/inc/upgrade_config.inc on line 4169
PHP ERROR: Type: 1, File: /etc/inc/upgrade_config.inc, Line: 4169, Message: Uncaught TypeError: Unsupported operand types: string * int in /etc/inc/upgrade_config.inc:4169
Stack trace:
#0 /etc/inc/config.lib.inc(519): upgrade_130_to_131()
#1 /etc/rc.bootup(140): convert_config()
#2 {main}


Related issues

Related to Bug #14742: Several PHP errors in upgrade_config.incNewJim Pingle

Actions
Actions #1

Updated by Steve Wheeler about 1 month ago

Specifically this was config version 8.0 I hit this on though I'd expect anything that hits upgrade_130_to_131() would fail here.

Actions #2

Updated by Steve Wheeler about 1 month ago

  • Related to Bug #14742: Several PHP errors in upgrade_config.inc added
Actions

Also available in: Atom PDF