Fix round() calls for PHP 8.0

This commit is contained in:
James Cole
2020-12-21 09:02:24 +01:00
parent fe66bb1984
commit 670bf26510
10 changed files with 18 additions and 18 deletions

View File

@@ -265,7 +265,7 @@ class BudgetController extends Controller
$total = $sums[$currencyId]['sum'] ?? '0';
$pct = '0';
if (0 !== bccomp($sum, '0') && 0 !== bccomp($total, '9')) {
$pct = round(bcmul(bcdiv($sum, $total), '100'));
$pct = round((float) bcmul(bcdiv($sum, $total), '100'));
}
$report[$budgetId]['currencies'][$currencyId]['sum_pct'] = $pct;
}