Fix #98
This commit is contained in:
parent
a39b44899a
commit
7763dfaa82
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue