Project

General

Profile

Bug #8630

Web-GUI PHP error in brige after removing all interfaces were in bridge

Added by Constantine Kormashev over 1 year ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Interfaces
Target version:
Start date:
07/10/2018
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.4.4
Affected Architecture:

Description

If device has several interfaces in bridge and all those interfaces are deleted, Web-GUI shows error in https://<addr>/interfaces_bridge.php

Warning: Illegal string offset 'bridged' in /usr/local/www/interfaces_bridge.php on line 32 Warning:
Illegal string offset 'bridged' in /usr/local/www/interfaces_bridge.php on line 35
Fatal error: Uncaught Error: Cannot create references to/from string offsets in /usr/local/www/interfaces_bridge.php: 35
Stack trace: #0 {main} thrown in /usr/local/www/interfaces_bridge.php on line 35
PHP ERROR: Type: 1, File: /usr/local/www/interfaces_bridge.php, Line: 35, Message:
Uncaught Error: Cannot create references to/from string offsets in /usr/local/www/interfaces_bridge.php:35 Stack trace: #0 {main} thrown

Looks like this is reaction on empty <bridge></bridge> section of config.
Before deleting interfaces:
<bridged>
    <members>lan,opt1,opt2</members>
    <descr><![CDATA[BRIDGE]]></descr>
    <maxaddr></maxaddr>
    <timeout></timeout>
    <maxage></maxage>
    <fwdelay></fwdelay>
    <hellotime></hellotime>
    <priority></priority>
    <proto>rstp</proto>
    <holdcnt></holdcnt>
    <ip6linklocal></ip6linklocal>
    <ifpriority></ifpriority>
    <ifpathcost></ifpathcost>
    <edge>lan,opt1,opt2</edge>
    <bridgeif>bridge0</bridgeif>
</bridged>

After deleting interfaces:
<bridges>
</bridges>

Config without bridges does not have this section at all. Maybe it would be better to delete bridge in case all interfaces composed bridge are not available.

empty_bridge.xml (43.6 KB) empty_bridge.xml Constantine Kormashev, 07/10/2018 02:00 AM
bridge.xml (43.9 KB) bridge.xml Constantine Kormashev, 07/10/2018 02:00 AM

Associated revisions

Revision 6f331d22 (diff)
Added by Stephen Jones over 1 year ago

Fixed #8630 , PHP7 illegal string offset.

History

#1 Updated by Anonymous over 1 year ago

  • Assignee set to Anonymous

#2 Updated by Anonymous over 1 year ago

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

#3 Updated by Anonymous over 1 year ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF