Project

General

Profile

Actions

Bug #14036

closed

PHP error when the ``timeserver`` section of the configuration is empty

Added by Christopher Cope about 1 year ago. Updated 11 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
NTPD
Target version:
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

Actions

Also available in: Atom PDF