Project

General

Profile

Actions

Regression #13563

closed

Feature #13446: Upgrade PHP from 7.4 to 8.1

PHP Error when attempting to save configuration after disabling a gateway

Added by Keith Townsend over 1 year ago. Updated over 1 year ago.

Status:
Resolved
Priority:
High
Category:
Gateways
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
23.01
Release Notes:
Force Exclusion
Affected Version:
2.7.x
Affected Architecture:

Description

PHP Error when attempting to save configuration after disabling a gateway

PHP ERROR: Type: 1, File: /etc/inc/gwlb.inc, Line: 1788, Message: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/gwlb.inc:1788
Stack trace:
#0 /usr/local/www/system_gateways_edit.php(99): validate_gateway(Array, '0')
#1 {main}
thrown @ 2022-10-14 06:54:14


Files

PHP_errors.log (1.02 KB) PHP_errors.log Danilo Zrenjanin, 10/15/2022 02:43 AM
Actions #1

Updated by Danilo Zrenjanin over 1 year ago

Tested on the:

2.7.0-DEVELOPMENT (amd64)
built on Fri Oct 14 06:04:12 UTC 2022
FreeBSD 14.0-CURRENT

I can confirm this behavior.

The same happens if you try to change the gateway from the console using Option 2) Set Interface(s) IP Address

Crash report begins.  Anonymous machine information:

amd64
14.0-CURRENT
FreeBSD 14.0-CURRENT #0 devel-main-n255799-28f6f5e488e: Fri Oct 14 06:28:01 UTC 2022     root@freebsd:/var/jenkins/workspace/pfSense-CE-snapshots-master-main/obj/amd64/5sNqxS3O/var/jenkins/workspace/pfSense-CE-snapshots-master-main/sources/FreeBSD-src-dev

Crash report details:

PHP Errors:
[15-Oct-2022 07:36:52 Etc/UTC] PHP Fatal error:  Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given in /etc/inc/config.lib.inc:1205
Stack trace:
#0 /etc/inc/config.lib.inc(1205): implode('/', 'gateways')
#1 /etc/rc.initial.setlanip(248): init_config_arr('gateways')
#2 /etc/rc.initial.setlanip(361): add_gateway_to_config('wan', '192.168.33.1', 'inet', false)
#3 /etc/rc.initial.setlanip(375): console_configure_ip_address(4)
#4 {main}
  thrown in /etc/inc/config.lib.inc on line 1205
[15-Oct-2022 07:40:26 Etc/UTC] PHP Fatal error:  Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given in /etc/inc/config.lib.inc:1205
Stack trace:
#0 /etc/inc/config.lib.inc(1205): implode('/', 'gateways')
#1 /etc/rc.initial.setlanip(248): init_config_arr('gateways')
#2 /etc/rc.initial.setlanip(361): add_gateway_to_config('wan', '192.168.33.1', 'inet', false)
#3 /etc/rc.initial.setlanip(375): console_configure_ip_address(4)
#4 {main}
  thrown in /etc/inc/config.lib.inc on line 1205

No FreeBSD crash data found.

It works fine if you choose DHCP to assign an IP address and gateway.

Actions #2

Updated by Jim Pingle over 1 year ago

  • Tracker changed from Bug to Regression
  • Target version set to 2.7.0
  • Plus Target Version set to 23.01
  • Release Notes changed from Default to Force Exclusion
Actions #4

Updated by Christian McDonald over 1 year ago

  • Status changed from Confirmed to Feedback
  • % Done changed from 0 to 100
Actions #5

Updated by Danilo Zrenjanin over 1 year ago

Tested against:

2.7.0-DEVELOPMENT (amd64)
built on Fri Oct 21 06:05:28 UTC 2022
FreeBSD 14.0-CURRENT

No more PHP errors after disabling a gateway.

Maybe I should close this bug report and open a new one? There is still an issue while defining the IP address and gateway from the console using option 2) Set Interface(s) IP address

Actions #6

Updated by Christian McDonald over 1 year ago

I have a fix in progress for that, please make a new redmine for it.

Actions #7

Updated by Christian McDonald over 1 year ago

  • Status changed from Feedback to Resolved
  • Assignee set to Christian McDonald
Actions #8

Updated by Danilo Zrenjanin over 1 year ago

This one is fixed.

Actions #9

Updated by Jim Pingle over 1 year ago

  • Parent task set to #13446
Actions

Also available in: Atom PDF