Project

General

Profile

Actions

Bug #15362

closed
SW MM

Config upgrade error with empty gateway interval tags.

Bug #15362: Config upgrade error with empty gateway interval tags.

Added by Steve Wheeler over 2 years ago. Updated almost 2 years ago.

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

100%

Estimated time:
Plus Target Version:
24.11
Release Notes:
Force Exclusion
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 1 (0 open1 closed)

Related to Bug #14742: Several PHP errors in upgrade_config.incResolvedMarcos M

Actions

SW Updated by Steve Wheeler over 2 years ago Actions #1

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.

SW Updated by Steve Wheeler over 2 years ago Actions #2

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

JP Updated by Jim Pingle over 2 years ago Actions #3

  • Plus Target Version changed from 24.07 to 24.08

MM Updated by Marcos M over 2 years ago Actions #4

  • Status changed from New to Resolved
  • Assignee set to Marcos M
  • % Done changed from 0 to 100
  • Release Notes changed from Default to Force Exclusion

MM Updated by Marcos M over 2 years ago Actions #5

Fixed with de9a3545ce34089e971947fd285522a406fce01f

JP Updated by Jim Pingle almost 2 years ago Actions #6

  • Plus Target Version changed from 24.08 to 24.11
Actions

Also available in: Atom