From c0cfac990eb4e917c71b0ad0146546f0a4da0c2f Mon Sep 17 00:00:00 2001 From: gonzofy <52811+gonzofy@users.noreply.github.com> Date: Tue, 9 May 2023 06:28:47 -0400 Subject: [PATCH] fix #98 --- src/ParserHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ParserHelper.php b/src/ParserHelper.php index 055cead..300346a 100644 --- a/src/ParserHelper.php +++ b/src/ParserHelper.php @@ -47,7 +47,7 @@ public static function convertCodepointToCharacter(int $char): string public static function convertToNumber(string $text) { // thanks to #andig for the fix for big integers - if (filter_var($text, FILTER_VALIDATE_INT) && (float) $text === (float) ((int) $text)) { + if (filter_var($text, FILTER_VALIDATE_INT) !== false && (float) $text === (float) ((int) $text)) { // natural number PHP_INT_MIN < $num < PHP_INT_MAX return (int) $text; }