Skip to content

Commit c0cfac9

Browse files
committed
fix #98
1 parent 6f1a5d4 commit c0cfac9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ParserHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public static function convertCodepointToCharacter(int $char): string
4747
public static function convertToNumber(string $text)
4848
{
4949
// thanks to #andig for the fix for big integers
50-
if (filter_var($text, FILTER_VALIDATE_INT) && (float) $text === (float) ((int) $text)) {
50+
if (filter_var($text, FILTER_VALIDATE_INT) !== false && (float) $text === (float) ((int) $text)) {
5151
// natural number PHP_INT_MIN < $num < PHP_INT_MAX
5252
return (int) $text;
5353
}

0 commit comments

Comments
 (0)