Skip to content

Commit 44dfa8d

Browse files
committed
Merge branch 'excess-participants-without-additional-participants'
[#78] Show validation warning instead of an error if `remote_registration_additional_participants_waitlist` is disabled, but request has no additional participants
2 parents 8f6c586 + 1f0394d commit 44dfa8d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

CRM/Remoteevent/RegistrationProfile.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,11 @@ function(int $carry, string $item) {
204204
&& ($excessParticipants = CRM_Remoteevent_Registration::getRegistrationCount($event['id']) + 1 + $additionalParticipantsCount - $event['max_participants']) > 0
205205
) {
206206
if (
207-
!empty($event['has_waitlist'])
208-
&& !empty($event['event_remote_registration.remote_registration_additional_participants_waitlist'])
207+
!empty($event['has_waitlist'])
208+
&& (
209+
$additionalParticipantsCount === 0
210+
|| !empty($event['event_remote_registration.remote_registration_additional_participants_waitlist'])
211+
)
209212
) {
210213
$validationEvent->addWarning(
211214
$l10n->localise('Not enough vacancies for the number of requested participants.')

0 commit comments

Comments
 (0)