Skip to content

Commit

Permalink
[K6.1] Php 8.1+ : mplicit conversion from float to int loses precision
Browse files Browse the repository at this point in the history
  • Loading branch information
xillibit committed Jul 16, 2023
1 parent fa54cc8 commit 0fb305f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libraries/kunena/src/Forum/Category/KunenaCategory.php
Expand Up @@ -1786,7 +1786,7 @@ public function formatLargeNumber(int $number, $precision = 3)
// Do we need to reduce the number of significant digits?
if ($number >= 10000) {
// Round the number to n significant digits
$number = round($number, -1 * (log10($number) + 1) + $precision);
$number = round($number, -1 * intval((log10($number) + 1)) + $precision);
}

if ($number < 10000) {
Expand Down

0 comments on commit 0fb305f

Please sign in to comment.