From 219f4d0bee2ce47228f21acd3ff1dcf83d303bbd Mon Sep 17 00:00:00 2001 From: Allen Shaw Date: Tue, 10 Aug 2021 12:51:53 -0500 Subject: [PATCH] Use recursive array merge to fix issue with tokens in subject and body. dev/core#2673: In an email, a token from an extension in a subject will inhibits the same token group in the email body. --- CRM/Activity/BAO/Activity.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Activity/BAO/Activity.php b/CRM/Activity/BAO/Activity.php index f07bdba02f..922abde289 100644 --- a/CRM/Activity/BAO/Activity.php +++ b/CRM/Activity/BAO/Activity.php @@ -1059,7 +1059,7 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity { $subjectToken = CRM_Utils_Token::getTokens($subject); $messageToken = CRM_Utils_Token::getTokens($text); $messageToken = array_merge($messageToken, CRM_Utils_Token::getTokens($html)); - $allTokens = array_merge($messageToken, $subjectToken); + $allTokens = CRM_Utils_Array::crmArrayMerge($messageToken, $subjectToken); if (!$from) { $from = "$fromDisplayName <$fromEmail>"; -- 2.25.1