From 929d149b3ff7b5feef7e277080543127937445f2 Mon Sep 17 00:00:00 2001 From: emkael Date: Mon, 10 Feb 2025 23:48:38 +0100 Subject: Fixing possibly unexpected ctype_digit behaviour if input is alrady integer, not string - also a deprecated behaviour in modern PHP --- http/api-inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {}; -- cgit v1.2.3