mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-17 01:42:19 +00:00
Fix division by zero.
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user