Skip to content

Commit

Permalink
[#87] Fix regression causing additional participants not being regist…
Browse files Browse the repository at this point in the history
…ered
  • Loading branch information
jensschuppe committed Jun 17, 2024
1 parent cf61cc7 commit 63ecd00
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CRM/Remoteevent/RegistrationProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ public function getAdditionalParticipantsFields(array $event, ?int $maxParticipa
'description' => E::ts('Registration data for additional participant %1', [1 => $i]),
];
foreach ($additional_fields as $additional_field_name => $additional_field) {
$additional_field['entity_field_name'] = $additional_field['name'];
$additional_field['name'] = 'additional_' . $i . '_' . $additional_field['name'];
$additional_field['parent'] = empty($additional_field['parent']) ? 'additional_' . $i : 'additional_' . $i . '_' . $additional_field['parent'];
$fields['additional_' . $i . '_' . $additional_field_name] = $additional_field;
Expand Down
2 changes: 1 addition & 1 deletion Civi/RemoteParticipant/RegistrationEventFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private function handleAdditionalParticipants(RegistrationEvent $registrationEve
}
}

if ([] === $additionalParticipantsData) {
if ([] === $additionalParticipantsData && [] === $additionalContactsData) {
return;
}

Expand Down

0 comments on commit 63ecd00

Please sign in to comment.