Skip to content

Commit 87244a0

Browse files
author
mbentz
committed
Fix bug breaking 'Repeat Entire Event'
1 parent 5fd13de commit 87244a0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ExternalModule.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,11 @@ function setDefaultValues() {
183183
// Getting previous event value.
184184
// isset returns true for event instances when $prev_event_field_value is equal to an empty string ("").
185185
// An additional check to verify the value is not empty is required.
186+
$source_form = ($_GET['instance'] > 1) ? $source_form : "";
186187
$prev_event_field_value = $data[$prev_event][$source_field];
187188
if (isset($prev_event_field_value) && !empty($prev_event_field_value)) {
188189
$default_value = $prev_event_field_value;
189-
} elseif ($data['repeat_instances'][$prev_event][$source_form]) {
190+
} elseif (isset($data['repeat_instances'][$prev_event][$source_form])) {
190191
// Handling repeat events by using the most recent instance of the previous event to source values
191192
$most_recent_instance = array_slice($data['repeat_instances'][$prev_event][$source_form], -1)[0];
192193
$default_value = $most_recent_instance[$source_field];

0 commit comments

Comments
 (0)