Actions
Bug #15907
closedPHP error in Captive Portal with undefined zone interface list
Start date:
Due date:
% Done:
100%
Estimated time:
Plus Target Version:
25.03
Release Notes:
Default
Affected Version:
Affected Architecture:
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
Updated by Jim Pingle 15 days ago
- 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", [])));
Updated by Jim Pingle 15 days ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset 64075a4359d070c300e09a94c2cf1f4854ce649b.
Updated by Jim Pingle 15 days ago
- 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
Updated by Jim Pingle 12 days ago
- Plus Target Version changed from 25.01 to 25.03
Actions