mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix division by zero.
This commit is contained in:
parent
859b6fcea8
commit
c1e1da12c2
@ -302,6 +302,9 @@ class BudgetController extends Controller
|
||||
$currentStart = app('navigation')->addPeriod($currentStart, $range, 0);
|
||||
++$count;
|
||||
}
|
||||
if ($count === 0) {
|
||||
$count = 1;
|
||||
}
|
||||
$result['available'] = bcdiv($total, strval($count));
|
||||
|
||||
// amount earned in this period:
|
||||
|
Loading…
Reference in New Issue
Block a user