Commit bea8906d authored by Ad Schellevis's avatar Ad Schellevis

check numeric

parent 4fb7a0c8
...@@ -51,7 +51,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -51,7 +51,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
} elseif ($_SERVER['REQUEST_METHOD'] === 'POST') { } elseif ($_SERVER['REQUEST_METHOD'] === 'POST') {
$pconfig = $_POST; $pconfig = $_POST;
$input_errors = array(); $input_errors = array();
if (!empty($pconfig['stratum']) && ($pconfig['stratum'] > 17 || $pconfig['stratum'] < 0 || (int)$pconfig['stratum'] == null)) { if (!empty($pconfig['stratum']) && ($pconfig['stratum'] > 17 || $pconfig['stratum'] < 0 || !is_numeric($pconfig['stratum']))) {
$input_errors[] = gettext("Clock stratum must be a number in the range 0..16"); $input_errors[] = gettext("Clock stratum must be a number in the range 0..16");
} }
// swap prefer // swap prefer
......
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