Skip to content

Firefly III: a personal finances manager

Fix https://github.com/firefly-iii/firefly-iii/issues/9022

James Cole7219c909573d
diff --git a/app/Http/Controllers/Json/RecurrenceController.php b/app/Http/Controllers/Json/RecurrenceController.php
index fdf7b136b3..99addd7e26 100644
--- a/app/Http/Controllers/Json/RecurrenceController.php
+++ b/app/Http/Controllers/Json/RecurrenceController.php
@@ -81,7 +81,12 @@ class RecurrenceController extends Controller
$skip = $skip < 0 || $skip > 31 ? 0 : $skip;
$weekend = $weekend < 1 || $weekend > 4 ? 1 : $weekend;
- if (null === $start || null === $end || null === $firstDate || null === $endDate) {
+ if(null === $endDate) {
+ // safety catch:
+ $endDate = now()->addYear();
+ }
+
+ if (null === $start || null === $end || null === $firstDate) {
return response()->json();
}