diff --git a/calendar/inc/class.calendar_merge.inc.php b/calendar/inc/class.calendar_merge.inc.php index 1b64c5677d..69f8031ee7 100644 --- a/calendar/inc/class.calendar_merge.inc.php +++ b/calendar/inc/class.calendar_merge.inc.php @@ -585,7 +585,8 @@ class calendar_merge extends Api\Storage\Merge * Validate and properly format a list of 'ID's into either a list of ranges * or a list of IDs, depending on what the template needs. Templates using * the range placeholder need a list of date ranges, templates using pagerepeat - * need a list of individual events. + * need a list of individual events. Templates using neither get just the + * first ID * * @param Array[]|String[] $ids List of IDs, which can be a list of individual * event IDs, entire events, a date range (start & end) or a list of date ranges. @@ -638,6 +639,10 @@ class calendar_merge extends Api\Storage\Merge } } } + else + { + $validated_ids[] = $this->normalize_event_id(array_shift($ids)); + } return $validated_ids; }