This commit is contained in:
Thomas Zilio 2018-01-05 17:23:17 +01:00
parent a39b44899a
commit 7763dfaa82
1 changed files with 3 additions and 1 deletions

View File

@ -809,10 +809,12 @@ function sum($first, $second = null, $decimals = null)
$bcadd = function_exists('bcadd');
foreach ($array as $value) {
$value = round($value, $decimals);
if ($bcadd) {
$result = bcadd($result, $value, $decimals);
} else {
$result = round($result, $decimals) + round($value, $decimals);
$result += $value;
}
}