CRM-11153 -- custom tokens not replaced for schedule reminder
authorjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Tue, 16 Feb 2016 09:47:14 +0000 (15:17 +0530)
committerjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Tue, 16 Feb 2016 09:47:14 +0000 (15:17 +0530)
Civi/Token/TokenCompatSubscriber.php

index 104d9f1117c51ac25e382a1cdc10c643eaff231f..3eaf57d3b7cc6ac6d92ccf948c9647a45825767b 100644 (file)
@@ -83,6 +83,10 @@ class TokenCompatSubscriber implements EventSubscriberInterface {
         $row->context['controller']
       );
 
+      // merge the custom tokens in the $contact array
+      if (!empty($contactArray[$contactId])) {
+        $contact = array_merge($contact, $contactArray[$contactId]);
+      }
       $row->context('contact', $contact);
     }
   }