diff --git a/src/Type/Definition/FloatType.php b/src/Type/Definition/FloatType.php index 363ce27..fb6ce02 100644 --- a/src/Type/Definition/FloatType.php +++ b/src/Type/Definition/FloatType.php @@ -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; }