Actions
Regression #14172
closedPHP error in Captive Portal if ``usedmacs`` list is empty
Start date:
Due date:
% Done:
100%
Estimated time:
Plus Target Version:
23.05
Release Notes:
Default
Affected Version:
2.7.0
Affected Architecture:
amd64
Description
PHP Errors:
[23-Mar-2023 19:32:38] PHP Fatal error: Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given in /etc/inc/captiveportal.inc:2354
Stack trace:
#0 /etc/inc/captiveportal.inc(2354): implode('\n', '')
#1 /etc/rc.carpmaster(196): captiveportal_write_usedmacs_db('')
#2 {main}
thrown in /etc/inc/captiveportal.inc on line 2354
This is after exporting a pfSense CE 2.6.0 config without Extras, i.e. without used captive portal information, and importing it back into pfSense Plus 23.01.
Of course then there are no usedmacs in the list/database and it seems to want to read that \n terminated list, creating an array out of it. But as there is nothing there, no array is generated. Thus the error.
At least this is what it looks like to me.
Related issues
Actions