mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-26 21:43:53 +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);
|
$currentStart = app('navigation')->addPeriod($currentStart, $range, 0);
|
||||||
++$count;
|
++$count;
|
||||||
}
|
}
|
||||||
|
if ($count === 0) {
|
||||||
|
$count = 1;
|
||||||
|
}
|
||||||
$result['available'] = bcdiv($total, strval($count));
|
$result['available'] = bcdiv($total, strval($count));
|
||||||
|
|
||||||
// amount earned in this period:
|
// amount earned in this period:
|
||||||
|
|||||||
Reference in New Issue
Block a user