Project

General

Profile

Actions

Bug #8630

closed

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

Added by Constantine Kormashev over 6 years ago. Updated over 6 years ago.

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

100%

Estimated time:
Plus Target Version:
Release Notes:
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.


Files

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
Actions #1

Updated by Anonymous over 6 years ago

  • Assignee set to Anonymous
Actions #2

Updated by Anonymous over 6 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #3

Updated by Anonymous over 6 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF