mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 12:48:29 +00:00
Use is_numeric(...) for checking if is either or type int or double or a valid numeric string
This commit is contained in:
2
api.php
2
api.php
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user