Project

General

Profile

Actions

Regression #14338

closed

PHP error from empty separator

Added by Jim Pingle over 1 year ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Rules / NAT
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
23.05
Release Notes:
Default
Affected Version:
2.7.0
Affected Architecture:

Description

If the configuration contains an empty separator entry, it can lead to a PHP error:

         <separator>
             <floatingrules></floatingrules>
            <wan>
                <sep0></sep0>
            </wan>
             <lan></lan>
         </separator>

Loading the firewall rules produces the following error:

PHP ERROR: Type: 1, File: /etc/inc/filter.inc, Line: 4777, Message: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/filter.inc:4777
Stack trace:
#0 /usr/local/www/firewall_rules.php(566): separator_rows(Array)
#1 {main}
thrown @ 2023-05-02 19:51:14

To me, seems to only need a few small PHP 8.x changes. Already have a tested and working fix ready.

Actions

Also available in: Atom PDF