Use is_numeric(...) for checking if is either or type int or double or a valid numeric string

This commit is contained in:
DL6ER
2017-01-27 11:48:35 +01:00
parent 96826da1f2
commit aa31fd13fe

View File

@@ -99,7 +99,7 @@
if (is_array($value)) {
$outArray[htmlspecialchars($key)] = filterArray($value);
} else {
$outArray[htmlspecialchars($key)] = !is_int($value) && !is_double($value) ? htmlspecialchars($value) : $value;
$outArray[htmlspecialchars($key)] = !is_numeric($value) ? htmlspecialchars($value) : $value;
}
}
return $outArray;