Minor variable cleanup
authoreileen <emcnaughton@wikimedia.org>
Mon, 22 Feb 2021 04:58:16 +0000 (17:58 +1300)
committereileen <emcnaughton@wikimedia.org>
Mon, 22 Feb 2021 04:58:16 +0000 (17:58 +1300)
CRM/Contribute/BAO/ContributionPage.php

index 94da29ee8afa96abce1a76018382e46a97e72f07..3fa3282f1b94be65299ee942f185ce3be583c472 100644 (file)
@@ -538,18 +538,14 @@ class CRM_Contribute_BAO_ContributionPage extends CRM_Contribute_DAO_Contributio
 
     if ($contribution['contribution_recur.is_email_receipt'] || $contribution['contribution_page.is_email_receipt']) {
       if ($contribution['contribution_page.receipt_from_email']) {
-        $receiptFrom = '"' . $contribution['contribution_page.receipt_from_name'] . '" <' . $contribution['contribution_page.receipt_from_email'] . '>';
-
         $receiptFromName = $contribution['contribution_page.receipt_from_name'];
         $receiptFromEmail = $contribution['contribution_page.receipt_from_email'];
       }
       else {
-        $domainValues = CRM_Core_BAO_Domain::getNameAndEmail();
-        $receiptFrom = "$domainValues[0] <$domainValues[1]>";
-        $receiptFromName = $domainValues[0];
-        $receiptFromEmail = $domainValues[1];
+        [$receiptFromName, $receiptFromEmail] = CRM_Core_BAO_Domain::getNameAndEmail();
       }
 
+      $receiptFrom = "$receiptFromName <$receiptFromEmail>";
       [$displayName, $email] = CRM_Contact_BAO_Contact_Location::getEmailDetails($contribution['contact_id'], FALSE);
       $templatesParams = [
         'groupName' => 'msg_tpl_workflow_contribution',