File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -183,10 +183,11 @@ function setDefaultValues() {
183
183
// Getting previous event value.
184
184
// isset returns true for event instances when $prev_event_field_value is equal to an empty string ("").
185
185
// An additional check to verify the value is not empty is required.
186
+ $ source_form = ($ _GET ['instance ' ] > 1 ) ? $ source_form : "" ;
186
187
$ prev_event_field_value = $ data [$ prev_event ][$ source_field ];
187
188
if (isset ($ prev_event_field_value ) && !empty ($ prev_event_field_value )) {
188
189
$ 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 ]) ) {
190
191
// Handling repeat events by using the most recent instance of the previous event to source values
191
192
$ most_recent_instance = array_slice ($ data ['repeat_instances ' ][$ prev_event ][$ source_form ], -1 )[0 ];
192
193
$ default_value = $ most_recent_instance [$ source_field ];
You can’t perform that action at this time.
0 commit comments