Project

General

Profile

Bug #9170

PHP error in Setup Wizard when gateways have been deleted

Added by Jim Pingle 10 months ago. Updated 9 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Web Interface
Target version:
Start date:
12/05/2018
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.4.4_1
Affected Architecture:
All

Description

If a gateway existed but was deleted, the config can be left with <gateways></gateways> which leads to a PHP error in the setup wizard:

PHP Fatal error:  Uncaught Error: Cannot iterate on string offsets by reference in /usr/local/www/wizard.php(1017) : eval()'d code:8
Stack trace:
#0 /usr/local/www/wizard.php(1017): eval()
#1 {main}
  thrown in /usr/local/www/wizard.php(1017) : eval()'d code on line 8

This is ultimately from source:src/usr/local/www/wizards/setup_wizard.xml#L772 trying to iterate the gateways array that isn't properly set as an array in this specific case.

Associated revisions

Revision f5f79fcc (diff)
Added by Jim Pingle 10 months ago

Fix array init in setup_wizard.xml. Fixes #9170

Revision 806cf061 (diff)
Added by Jim Pingle 10 months ago

Fix array init in setup_wizard.xml. Fixes #9170

(cherry picked from commit f5f79fcc24241f0a76f6a7fe9b32917bee64e393)

History

#1 Updated by Jim Pingle 10 months ago

  • Description updated (diff)

#2 Updated by Jim Pingle 10 months ago

Note: This also only affects the wizard when setting a static WAN and upstream gateway.

Fix pushed, will show up momentarily.

#3 Updated by Jim Pingle 10 months ago

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

#4 Updated by Constantine Kormashev 10 months ago

I checked the issue on latest 2.4.5-DEV and did not observe it. Gateways and their routes were successfully deleted and Wizard did not produce any errors.

#5 Updated by Jim Pingle 9 months ago

  • Status changed from Feedback to Resolved

#6 Updated by Jim Pingle 9 months ago

  • Target version changed from 48 to 2.4.4-p2

Also available in: Atom PDF