[Form] Handle all case variants of "nan" when parsing a number

Fixes #29321
This commit is contained in:
Michael Hudson-Doyle 2018-11-27 11:41:07 +13:00 committed by Christian Flothmann
parent d129e197fe
commit d903dcbac5
1 changed files with 1 additions and 1 deletions

View File

@ -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');
}