From 7219c909573de453656fc767fd49fdfcb540f86b Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 6 Jul 2024 15:42:33 +0200 Subject: [PATCH] Fix https://github.com/firefly-iii/firefly-iii/issues/9022 --- app/Http/Controllers/Json/RecurrenceController.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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(); }