From 219ac01b5e65fbd88ce56edf90262b7a1bdabb1f Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Tue, 9 Aug 2022 20:08:30 +1200 Subject: [PATCH] It seems we need find(TRUE) to reliably load --- CRM/Contribute/BAO/Contribution.php | 2 +- CRM/Contribute/Form/Task/Invoice.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index 57aa175402..2f393e5120 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -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'])) { diff --git a/CRM/Contribute/Form/Task/Invoice.php b/CRM/Contribute/Form/Task/Invoice.php index 13eb2721cb..82aa699670 100644 --- a/CRM/Contribute/Form/Task/Invoice.php +++ b/CRM/Contribute/Form/Task/Invoice.php @@ -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. -- 2.25.1