mirror of
https://github.com/retailcrm/graphql-php.git
synced 2025-02-06 15:59:24 +03:00
Do not parse invalid input strings as floats (see #125)
This commit is contained in:
parent
6fb62b25b3
commit
4eb68bf63f
@ -67,7 +67,7 @@ values as specified by
|
||||
public function parseLiteral($ast)
|
||||
{
|
||||
if ($ast instanceof FloatValueNode || $ast instanceof IntValueNode) {
|
||||
return (float) $ast->value;
|
||||
return is_numeric($ast->value) ? (float) $ast->value : null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user