Skip to content

Commit 845f096

Browse files
mwhudsonxabbuh
authored andcommitted
[Form] Handle all case variants of "nan" when parsing a number
Fixes #29321
1 parent 44ad96b commit 845f096

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public function reverseTransform($value)
146146
return;
147147
}
148148

149-
if ('NaN' === $value) {
149+
if (\in_array($value, array('NaN', 'NAN', 'nan'), true)) {
150150
throw new TransformationFailedException('"NaN" is not a valid number');
151151
}
152152

0 commit comments

Comments
 (0)