Skip to content

Commit 46c4e96

Browse files
committed
do not cast too big floats to int
1 parent b40cdbe commit 46c4e96

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
@@ -177,7 +177,7 @@ protected function getNumberFormatter(): \NumberFormatter
177177
*/
178178
protected function castParsedValue(int|float $value): int|float
179179
{
180-
if (\is_int($value) && $value === (int) $float = (float) $value) {
180+
if (\is_int($value) && (($float = (float) $value) < \PHP_INT_MAX) && $value === (int) $float) {
181181
return $float;
182182
}
183183

0 commit comments

Comments
 (0)