Actions
Bug #14004
closedPHP errors when configuration lacks any certificates
Start date:
Due date:
% Done:
100%
Estimated time:
Plus Target Version:
23.05
Release Notes:
Default
Affected Version:
2.7.0
Affected Architecture:
All
Description
When visiting the DNS resolver config page without any certs present:
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
See: https://forum.netgate.com/topic/178037/fatal-error-uncaught-typeerror-at-dns-resolver-page
Updated by Jim Pingle over 1 year ago
- Category changed from Web Interface to DNS Resolver
- Assignee set to Jim Pingle
Updated by Jim Pingle over 1 year ago
- Subject changed from PHP ERROR: /usr/local/www/services_unbound.php:70 to PHP errors when configuration lacks any certificates
- Category changed from DNS Resolver to Certificates
I spotted a couple other areas outside of the resolver that had a similar call in the code to here, where if there were no certificates it may get null instead of an array.
The commit I just pushed should account for all of these.
Updated by Jim Pingle over 1 year ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset 8de38eecb5939b212c973a3209b8c5d455e4a64c.
Updated by Danilo Zrenjanin over 1 year ago
Tested the patch against:
23.01-RELEASE (amd64) built on Fri Feb 10 20:06:33 UTC 2023 FreeBSD 14.0-CURRENT
It works fine. I am marking this ticket resolved.
Updated by Danilo Zrenjanin over 1 year ago
- Status changed from Feedback to Resolved
Actions