Hi,
after upgrading to 22.7.7 I noticed this error in the reporter, (this seems to persist even in 22.7.7_1:
[04-Nov-2022 09:30:45 Europe/Rome] TypeError: array_merge(): Argument #1 must be of type array, null given in /usr/local/opnsense/mvc/app/controllers/OPNsense/Wireguard/Api/GeneralController.php:93
Stack trace:
#0 /usr/local/opnsense/mvc/app/controllers/OPNsense/Wireguard/Api/GeneralController.php(93): array_merge(NULL, Array)
#1 [internal function]: OPNsense\Wireguard\Api\GeneralController->getStatusAction()
#2 [internal function]: Phalcon\Dispatcher\AbstractDispatcher->callActionMethod(Object(OPNsense\Wireguard\Api\GeneralController), 'getStatusAction', Array)
#3 [internal function]: Phalcon\Dispatcher\AbstractDispatcher->dispatch()
#4 /usr/local/opnsense/www/api.php(24): Phalcon\Mvc\Application->handle('/api/wireguard/...')
#5 {main}
[04-Nov-2022 09:31:03 Europe/Rome] TypeError: array_merge(): Argument #1 must be of type array, null given in /usr/local/opnsense/mvc/app/controllers/OPNsense/Wireguard/Api/GeneralController.php:93
Stack trace:
#0 /usr/local/opnsense/mvc/app/controllers/OPNsense/Wireguard/Api/GeneralController.php(93): array_merge(NULL, Array)
#1 [internal function]: OPNsense\Wireguard\Api\GeneralController->getStatusAction()
#2 [internal function]: Phalcon\Dispatcher\AbstractDispatcher->callActionMethod(Object(OPNsense\Wireguard\Api\GeneralController), 'getStatusAction', Array)
#3 [internal function]: Phalcon\Dispatcher\AbstractDispatcher->dispatch()
#4 /usr/local/opnsense/www/api.php(24): Phalcon\Mvc\Application->handle('/api/wireguard/...')
#5 {main}
I've made a note here https://github.com/opnsense/plugins/pull/3117#issuecomment-1303184716
Thanks for the report.
Cheers,
Franco
I can't quickly check, but maybe just a typo at L54: getAttributes()?
UPD: sorry. look like there is already a fix pr
https://github.com/opnsense/plugins/pull/3180
Yup, and it can be applied by 'opnsense-patch -c plugins e807ec61bbddcf8834095f56d47e5c9e164d438b'.
That's a bit funny, of course you can abbreviate the commit hash for manual typing..
# opnsense-patch -c plugins e807ec61
;)
Thanks everyone for the support. I'll mark the thread as solved