From 63f1c7911c376db074e4daf634f363d105cfe572 Mon Sep 17 00:00:00 2001 From: Matthew Wire Date: Tue, 2 Feb 2021 19:30:39 +0000 Subject: [PATCH] Remove another use of loadRelatedObjects() as we call it again before using --- CRM/Contribute/BAO/Contribution.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index 6327b8ec3c13..249f187482ad 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -2795,7 +2795,7 @@ public function loadRelatedObjects($input, &$ids, $loadAll = FALSE) { * @throws Exception */ public function composeMessageArray(&$input, &$ids, &$values, $returnMessageText = TRUE) { - $this->loadRelatedObjects($input, $ids); + $this->loadRelatedObjects($input, $ids, TRUE); if (empty($this->_component)) { $this->_component = $input['component'] ?? NULL; @@ -4345,7 +4345,6 @@ public static function sendMail($input, $ids, $contributionID, $returnMessageTex if (!$contribution->find(TRUE)) { throw new CRM_Core_Exception('Contribution does not exist'); } - $contribution->loadRelatedObjects($input, $ids, TRUE); // set receipt from e-mail and name in value if (!$returnMessageText) { list($values['receipt_from_name'], $values['receipt_from_email']) = self::generateFromEmailAndName($input, $contribution);