Commit dbf53220 authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(legacy) regression services_ntpd.php

(cherry picked from commit cdb17e69)
parent 5e20393d
...@@ -93,7 +93,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -93,7 +93,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$a_ntpd['prefer'] = ""; $a_ntpd['prefer'] = "";
if (!empty($pconfig['timeservers_prefer'])) { if (!empty($pconfig['timeservers_prefer'])) {
foreach ($pconfig['timeservers_prefer'] as $timeserver) { foreach ($pconfig['timeservers_prefer'] as $timeserver) {
if (!in_array($timeserver, $pconfig['timeservers_noselect'])) { if (!is_array($pconfig['timeservers_noselect']) || !in_array($timeserver, $pconfig['timeservers_noselect'])) {
// a timeserver can't be both preferred and disabled, don't set preferred when disabled // a timeserver can't be both preferred and disabled, don't set preferred when disabled
$a_ntpd['prefer'] .= $timeserver . " "; $a_ntpd['prefer'] .= $timeserver . " ";
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment