Commit 4f47312a authored by Ad Schellevis's avatar Ad Schellevis

(legacy) fix crashreport PHP Warning: substr_count(): Empty substring in...

(legacy) fix crashreport  PHP Warning:  substr_count(): Empty substring in /usr/local/www/services_ntpd.php on line 290
parent 320d383f
......@@ -287,10 +287,10 @@ include("head.inc");
}
echo "<input name=\"server{$i}\" class=\"formfld unknown\" id=\"server{$i}\" size=\"30\" value=\"{$timeserverVal}\" type=\"text\" />&emsp;";
echo "\n<input name=\"servprefer{$i}\" class=\"formcheckbox\" id=\"servprefer{$i}\" onclick=\"CheckOffOther('servprefer{$i}', 'servselect{$i}')\" type=\"checkbox\"";
if (isset($config['ntpd']['prefer']) && substr_count($config['ntpd']['prefer'], $timeserverVal)) echo " checked=\"checked\"";
if (!empty($config['ntpd']['prefer']) && substr_count($config['ntpd']['prefer'], $timeserverVal)) echo " checked=\"checked\"";
echo " />&nbsp;prefer&emsp;";
echo "\n<input name=\"servselect{$i}\" class=\"formcheckbox\" id=\"servselect{$i}\" onclick=\"CheckOffOther('servselect{$i}', 'servprefer{$i}')\" type=\"checkbox\"";
if (isset($config['ntpd']['noselect']) && substr_count($config['ntpd']['noselect'], $timeserverVal)) echo " checked=\"checked\"";
if (!empty($config['ntpd']['noselect']) && substr_count($config['ntpd']['noselect'], $timeserverVal)) echo " checked=\"checked\"";
echo " />&nbsp;noselect\n<br />\n</div>\n";
}
?>
......
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