Skip to content
Snippets Groups Projects
Commit 2d7ad99e authored by Owen Bush's avatar Owen Bush
Browse files

Fix bug if excluded/included date fields are removed from the form

parent a92e5e65
No related branches found
No related tags found
No related merge requests found
......@@ -207,8 +207,12 @@ class EventCreationService {
$config['type'] = $user_input['recur_type'];
$config['excluded_dates'] = $this->getDatesFromForm($user_input['excluded_dates']);
$config['included_dates'] = $this->getDatesFromForm($user_input['included_dates']);
if (!empty($user_input['excluded_dates'])) {
$config['excluded_dates'] = $this->getDatesFromForm($user_input['excluded_dates']);
}
if (!empty($user_input['included_dates'])) {
$config['included_dates'] = $this->getDatesFromForm($user_input['included_dates']);
}
if ($config['type'] === 'custom') {
foreach ($user_input['custom_date'] as $custom_date) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment