Commit eff488cc authored by Carsten  Rose's avatar Carsten Rose
Browse files

Sanatize.php: replaced 'ctype_digit()' by 'is_numeric' to make the code easier.

parent ebe71edd
......@@ -33,12 +33,7 @@ class Sanatize {
switch ($sanatizeClass) {
case SANATIZE_DEFAULT:
case SANATIZE_DIGIT:
$newvalue = (string)$value;
// remove '-'
if (substr($newvalue, 0, 1) === "-") {
$newvalue = substr($newvalue, 1);
}
if (!ctype_digit($newvalue)) {
if (!is_numeric($value)) {
$value = '';
}
break;
......
Supports Markdown
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