Regression #13563
closedFeature #13446: Upgrade PHP from 7.4 to 8.1
PHP Error when attempting to save configuration after disabling a gateway
100%
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
Updated by Danilo Zrenjanin about 2 years ago
- File PHP_errors.log PHP_errors.log added
- Status changed from New to Confirmed
- Priority changed from Normal to High
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.
Updated by Jim Pingle about 2 years 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
Updated by Christian McDonald about 2 years ago
Fixed some more potential problematic config access https://gitlab.netgate.com/pfSense/pfSense/-/commit/9178a64972685f1e66dd4429e37becdcad47ac99
Updated by Christian McDonald about 2 years ago
- Status changed from Confirmed to Feedback
- % Done changed from 0 to 100
Applied in changeset 9178a64972685f1e66dd4429e37becdcad47ac99.
Updated by Danilo Zrenjanin about 2 years 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
Updated by Christian McDonald about 2 years ago
I have a fix in progress for that, please make a new redmine for it.
Updated by Christian McDonald about 2 years ago
- Status changed from Feedback to Resolved
- Assignee set to Christian McDonald