dev/core#4247 Ensure that Membership values are populated to prevent fatal error...
authorSeamus Lee <seamuslee001@gmail.com>
Thu, 20 Apr 2023 03:21:33 +0000 (13:21 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Thu, 20 Apr 2023 03:21:33 +0000 (13:21 +1000)
CRM/Batch/Form/Entry.php

index b8186c8ef5969e4f33ed72b817d4897c2509552a..7a4a7fe715494976c4201fca52ae3308e90fe262 100644 (file)
@@ -927,7 +927,7 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form {
   protected function emailReceipt($form, &$formValues): bool {
     $membership = new CRM_Member_BAO_Membership();
     $membership->id = $this->getCurrentRowMembershipID();
-    $membership->fetch();
+    $membership->find(TRUE);
     // @todo figure out how much of the stuff below is genuinely shared with the batch form & a logical shared place.
     if (!empty($formValues['payment_instrument_id'])) {
       $paymentInstrument = CRM_Contribute_PseudoConstant::paymentInstrument();