Bug #15907
closed
PHP error in Captive Portal with undefined zone interface list
Added by Danilo Zrenjanin 16 days ago.
Updated 1 day ago.
Plus Target Version:
25.03
Description
Following the upgrade to version 24.11, the captive portal intermittently displays PHP error messages. However, production operations continue to function without any disruption.
I've attached the file containing the PHP error details.
Files
- Assignee set to Jim Pingle
- Target version set to 2.8.0
- Plus Target Version set to 25.01
[05-Dec-2024 09:37:19 Europe/Rome] PHP Fatal error: Uncaught TypeError: explode(): Argument #2 ($string) must be of type string, array given in /etc/inc/captiveportal.inc:1746
Stack trace:
#0 /etc/inc/captiveportal.inc(1746): explode()
#1 /etc/inc/captiveportal.inc(1802): portal_ip_from_client_ip()
#2 /etc/inc/captiveportal.inc(1823): portal_hostname_from_client_ip()
#3 /usr/local/captiveportal/index.php(60): portal_reply_page()
#4 {main}
thrown in /etc/inc/captiveportal.inc on line 1746
Looks like this line shouldn't be using []
as the default, but ""
:
$interfaces = array_filter(explode(",", config_get_path("captiveportal/{$cpzone}/interface", [])));
- Status changed from New to Feedback
- % Done changed from 0 to 100
- Subject changed from Intermittent PHP Error Messages in Captive Portal Post-Upgrade to Version 24.11 to PHP error in Captive Portal with undefined zone interface list
- Plus Target Version changed from 25.01 to 25.03
- Status changed from Feedback to Resolved
Also available in: Atom
PDF