diff options
author | emkael <emkael@tlen.pl> | 2025-02-10 23:48:38 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2025-02-10 23:48:38 +0100 |
commit | 929d149b3ff7b5feef7e277080543127937445f2 (patch) | |
tree | 4ef3fdc4832ea0053077115317c576980b729273 | |
parent | 4666b544091bb92acf0f2a76cec9568920ea943c (diff) |
Fixing possibly unexpected ctype_digit behaviour if input is alrady integer, not string - also a deprecated behaviour in modern PHP
-rw-r--r-- | http/api-inc.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/http/api-inc.php b/http/api-inc.php index c10d9d2..22864ea 100644 --- a/http/api-inc.php +++ b/http/api-inc.php @@ -27,7 +27,7 @@ function recursive_ksort(&$array, $flags = SORT_REGULAR) { } function is_integer_like($value) { - return ctype_digit($value) || is_int($value); + return ctype_digit(strval($value)) || is_int($value); } class ParametersException extends Exception {}; |