Remove another use of loadRelatedObjects() as we call it again before using
authorMatthew Wire <mjw@mjwconsult.co.uk>
Tue, 2 Feb 2021 19:30:39 +0000 (19:30 +0000)
committerMatthew Wire <mjw@mjwconsult.co.uk>
Tue, 2 Feb 2021 20:09:27 +0000 (20:09 +0000)
CRM/Contribute/BAO/Contribution.php

index 6327b8ec3c13dad2c93dd25f90c94c81b29b854b..249f187482ad1e07a0e1891fa03c3de9362d6dfb 100644 (file)
@@ -2795,7 +2795,7 @@ INNER JOIN civicrm_activity ON civicrm_activity_contact.activity_id = civicrm_ac
    * @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 @@ INNER JOIN civicrm_activity ON civicrm_activity_contact.activity_id = civicrm_ac
     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);