Fatal error: Uncaught TypeError: at DNS resolver page
-
After updating to 23.01 and trying to access the DNS resolver page I'm getting this error:
Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /usr/local/www/services_unbound.php:70 Stack trace: #0 {main} thrown in /usr/local/www/services_unbound.php on line 70 PHP ERROR: Type: 1, File: /usr/local/www/services_unbound.php, Line: 70, Message: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /usr/local/www/services_unbound.php:70 Stack trace: #0 {main} thrown
Any ideas?
Thanks.
-
@flashman007 Sounds like a similar issue as here:
https://forum.netgate.com/topic/178011/php-fatal-error-uncaught-typeerror-cannot-access-offset-of-type-string-on-string-in-usr-local-www-firewall_rules-php-805?loggedin=true -
It's not that though, that's an issue in a different page.
That line is:
if (count(config_get_path('cert'))) {
So that implies there is no cert section in your config. Or maybe more than one?
I expect there always to be at least one cert present there though because the web cert would be added. Unless maybe you're using http?
Steve
-
That should probably have a
, []
on there to ensure it always passes back an array in that call and never getsnull
. Easy enough to fix, but should get a Redmine issue first if there isn't one already. -