Actions
Regression #14794
closedPHP error when adding firewall rule when the configuration contains no separators
Start date:
Due date:
% Done:
100%
Estimated time:
Plus Target Version:
23.09
Release Notes:
Force Exclusion
Affected Version:
2.8.0
Affected Architecture:
Description
Trying to add a firewall rule to a configuration without separators yields a PHP error:
[19-Sep-2023 15:19:37 Etc/UTC] PHP Fatal error: Uncaught TypeError: array_get_path(): Argument #1 ($arr) must be of type array, string given, called in /etc/inc/filter.inc on line 4985 and defined in /etc/inc/util.inc:3551 Stack trace: #0 /etc/inc/filter.inc(4985): array_get_path('', 'row/0') #1 /usr/local/www/firewall_rules_edit.php(1085): shift_separators(Array, -1) #2 {main} thrown in /etc/inc/util.inc on line 3551
The config.xml
section for separators is empty:
<separator></separator>
To me, I have a fix
Updated by Jim Pingle about 1 year ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset 261ffcca08615d80f790cdeaeed4d77647362fe2.
Updated by Danilo Zrenjanin about 1 year ago
I manually added an empty <separator></separator> tag to the config and upon making a rule I didn't get any PHP errors.
Tested against:
23.09-DEVELOPMENT (amd64) built on 20230920-1314 FreeBSD 14.0-CURRENT
However, when I tried to add a new separator I got a PHP error.
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/firewall_rules.php:325 Stack trace: #0 {main} thrown in /usr/local/www/firewall_rules.php on line 325 PHP ERROR: Type: 1, File: /usr/local/www/firewall_rules.php, Line: 325, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/firewall_rules.php:325 Stack trace: #0 {main} thrown
Please check.
Updated by Jim Pingle about 1 year ago
- Status changed from Feedback to In Progress
I can reproduce that as well, fix coming momentarily.
Updated by Jim Pingle about 1 year ago
- Status changed from In Progress to Feedback
Applied in changeset 022cb5c41f38bcdd65b512cdbc82360fff6f6a1b.
Updated by Danilo Zrenjanin about 1 year ago
- Status changed from Feedback to Resolved
The patch fixes it.
I am marking this ticket resolved.
Updated by Jim Pingle about 1 year ago
- Target version changed from 2.8.0 to 2.7.1
Actions