It seems we need find(TRUE) to reliably load
authorEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 9 Aug 2022 08:08:30 +0000 (20:08 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 9 Aug 2022 08:08:30 +0000 (20:08 +1200)
CRM/Contribute/BAO/Contribution.php
CRM/Contribute/Form/Task/Invoice.php

index 57aa175402b011c2141495f84299c405466ddb9b..2f393e51206b173dbfdaf93a3033f1a835e91334 100644 (file)
@@ -1828,7 +1828,7 @@ LEFT JOIN  civicrm_contribution contribution ON ( componentPayment.contribution_
 
     $contribution = new CRM_Contribute_BAO_Contribution();
     $contribution->id = $ids['contribution'];
-    $contribution->find();
+    $contribution->find(TRUE);
 
     if (empty($contribution->_component)) {
       if (!empty($ids['event'])) {
index 13eb2721cb937e0f2ff55a52056f635076a7798a..82aa6996707f2f5abfadcf581d4d6ed4d528206a 100644 (file)
@@ -239,7 +239,7 @@ class CRM_Contribute_Form_Task_Invoice extends CRM_Contribute_Form_Task {
 
       $contribution = new CRM_Contribute_BAO_Contribution();
       $contribution->id = $contributionID;
-      $contribution->fetch();
+      $contribution->find(TRUE);
       // @todo this is only used now to load the event title, it causes an enotice
       // and calls deprecated code. If we decide a contribution title is a
       // 'real thing' then we should create a token.