Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c875d0a

Browse files
committed
[Form] fixed INF usage which does not work on Solaris (closes #8246)
1 parent 66e2227 commit c875d0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function reverseTransform($value)
128128
throw new TransformationFailedException($formatter->getErrorMessage());
129129
}
130130

131-
if ($result >= INF || $result <= -INF) {
131+
if ($result >= PHP_INT_MAX || $result <= -PHP_INT_MAX) {
132132
throw new TransformationFailedException('I don\'t have a clear idea what infinity looks like');
133133
}
134134

0 commit comments

Comments
 (0)