Skip to content

Commit

Permalink
fix #98
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzofy committed May 9, 2023
1 parent 6f1a5d4 commit c0cfac9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ParserHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit c0cfac9

Please sign in to comment.