diff --git a/Sources/Localization/MessageFormatter.php b/Sources/Localization/MessageFormatter.php index 58fb0c904c..388a1bea4e 100644 --- a/Sources/Localization/MessageFormatter.php +++ b/Sources/Localization/MessageFormatter.php @@ -865,7 +865,7 @@ protected static function applyNumberSkeleton(int|float|string $number, string $ // Ensure $number is a string. if (is_float($number)) { - $precision = (int) strpos(strrev(strval($number)), '.') - strlen(strval(intval($number + 0))) - 1; + $precision = (int) strpos(strrev(strval($number)), '.'); $number = sprintf("%{$flags}.{$precision}F", $number); } elseif (is_int($number)) { $number = sprintf("%{$flags}d", $number);