[Form] Handle all case variants of "nan" when parsing a number
Fixes #29321
This commit is contained in:
parent
d129e197fe
commit
d903dcbac5
@ -146,7 +146,7 @@ class NumberToLocalizedStringTransformer implements DataTransformerInterface
|
||||
return;
|
||||
}
|
||||
|
||||
if ('NaN' === $value) {
|
||||
if (\in_array($value, array('NaN', 'NAN', 'nan'), true)) {
|
||||
throw new TransformationFailedException('"NaN" is not a valid number');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user