From cec8210d8b4c0922400a070dce7d8b136e3ff9c7 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 27 Jan 2019 17:09:39 +0100 Subject: [PATCH] Fix #2009 --- app/Services/Internal/Update/RecurrenceUpdateService.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Services/Internal/Update/RecurrenceUpdateService.php b/app/Services/Internal/Update/RecurrenceUpdateService.php index 7205b4c9ff..0fe5f18be7 100644 --- a/app/Services/Internal/Update/RecurrenceUpdateService.php +++ b/app/Services/Internal/Update/RecurrenceUpdateService.php @@ -64,11 +64,12 @@ class RecurrenceUpdateService $recurrence->apply_rules = $data['recurrence']['apply_rules'] ?? $recurrence->apply_rules; $recurrence->active = $data['recurrence']['active'] ?? $recurrence->active; + if (isset($data['recurrence']['repetition_end'])) { - if (\in_array($data['recurrence']['repetition_end'], ['forever ', 'until_date'])) { + if (\in_array($data['recurrence']['repetition_end'], ['forever', 'until_date'])) { $recurrence->repetitions = 0; } - if (\in_array($data['recurrence']['repetition_end'], ['forever ', 'times'])) { + if (\in_array($data['recurrence']['repetition_end'], ['forever', 'times'])) { $recurrence->repeat_until = null; } }