Actions
Bug #14036
closedPHP error when the ``timeserver`` section of the configuration 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:
Description
The following error is thrown when there is an empty or missing "timeserver" entry in the config.
The code should check for the above situation(s).
[25-Feb-2023 16:46:09 Etc/UTC] PHP Fatal error: Uncaught ValueError: substr_count(): Argument #2 ($needle) cannot be empty in /etc/inc/system.inc:2023 Stack trace: #0 /etc/inc/system.inc(2023): substr_count('', '') #1 /etc/rc.bootup(356): system_ntp_configure() #2 {main} thrown in /etc/inc/system.inc on line 2023
Updated by Jim Pingle over 1 year ago
- Target version set to 2.7.0
- Plus Target Version set to 23.05
Updated by Jim Pingle over 1 year ago
I don't see how anyone would get it into this state without manual config editing. Neither system.php nor the NTP config page allow you to save an empty list.
That said, if I clear out the list in my config (<timeservers></timeservers>
) then I can reproduce the error.
Updated by Jim Pingle over 1 year ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset 6ffd8bbcbb3e4d4b84a0036ff879a9837c4f0d45.
Updated by Danilo Zrenjanin over 1 year ago
- Status changed from Feedback to Resolved
I could replicate the issue on the:
23.01-RELEASE (amd64) built on Fri Feb 10 20:06:33 UTC 2023 FreeBSD 14.0-CURRENT
The patch fixes it successfully. I am marking this ticket resolved.
Updated by Jim Pingle over 1 year ago
- Subject changed from PHP error when missing timeserver in config to PHP error when the ``timeserver`` section of the configuration is empty
Updating subject for release notes.
Actions