Fix enotice (possible regression)
authorEileen McNaughton <emcnaughton@wikimedia.org>
Wed, 6 Sep 2023 08:10:20 +0000 (20:10 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Wed, 6 Sep 2023 08:11:36 +0000 (20:11 +1200)
It's clear in the function that lineItem is only defined for add - I hit the enotice editing
the participant to be paid. Not sure if this is a regression but there was a related one
fixed in 5.65 or 5.64 so targetting the rc

CRM/Event/Form/Participant.php

index 2f931a217b9c5ee2b98464ac3bc1dcfdc645671f..f463f1b8c35c73b204aca6a10e52911848eecc75 100644 (file)
@@ -1350,7 +1350,7 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment
     }
 
     if (!empty($params['send_receipt'])) {
-      $result = $this->sendReceipts($params, $contributionParams['total_amount'], $customFields, $participants, $lineItem[0], $additionalParticipantDetails);
+      $result = $this->sendReceipts($params, $contributionParams['total_amount'], $customFields, $participants, $lineItem[0] ?? [], $additionalParticipantDetails);
     }
 
     // set the participant id if it is not set