Actions
Bug #14446
closedPHP error in Captive Portal ``usedmacs`` handling
Start date:
Due date:
% Done:
100%
Estimated time:
Plus Target Version:
23.05.1
Release Notes:
Default
Affected Version:
2.7.0
Affected Architecture:
Description
[03-Jun-2023 12:26:11 US/Eastern] PHP Fatal error: Uncaught TypeError: trim(): Argument #1 ($string) must be of type string, array given in /etc/inc/captiveportal.inc:2354 Stack trace: #0 /etc/inc/captiveportal.inc(2354): trim(Array) #1 /etc/rc.carpmaster(196): captiveportal_write_usedmacs_db(Array) #2 {main} thrown in /etc/inc/captiveportal.inc on line 2354
Getting this on
23.05-RELEASE (amd64) built on Mon May 22 15:04:36 UTC 2023 FreeBSD 14.0-CURRENT
Based on the code I'm not sure how an array is getting to that point, since the code is wrapped with "!is_array()". Trying to narrow it down.
Related issues
Updated by Christopher Cope over 1 year ago
- Related to Regression #14172: PHP error in Captive Portal if ``usedmacs`` list is empty added
Updated by Christopher Cope over 1 year ago
- Assignee set to Christopher Cope
I misread the code at first. It uses an or statement, so if $usedmacs is an array it tries to trim it and check if it is empty. This is invalid since trim expects a string. Merge request coming shortly.
Updated by Christopher Cope over 1 year ago
- Status changed from New to Pull Request Review
Updated by Jim Pingle over 1 year ago
- Subject changed from PHP error in Captive Portal to PHP error in Captive Portal ``usedmacs`` handling
Updated by Christopher Cope over 1 year ago
- Status changed from Pull Request Review to Feedback
- % Done changed from 0 to 100
Applied in changeset 87d2b7464311c1f94b827a38502260e2e5a23e08.
Updated by Jim Pingle over 1 year ago
- Target version set to 2.7.0
- Plus Target Version set to 23.05.1
Actions