projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #9660 from colemanw/CRM-19769
[civicrm-core.git]
/
Civi
/
Token
/
TokenCompatSubscriber.php
diff --git
a/Civi/Token/TokenCompatSubscriber.php
b/Civi/Token/TokenCompatSubscriber.php
index 104d9f1117c51ac25e382a1cdc10c643eaff231f..e6c2f72e65f2a1d17c819a9d7f261d72a6b5c5e0 100644
(file)
--- a/
Civi/Token/TokenCompatSubscriber.php
+++ b/
Civi/Token/TokenCompatSubscriber.php
@@
-49,6
+49,7
@@
class TokenCompatSubscriber implements EventSubscriberInterface {
$messageTokens = $e->getTokenProcessor()->getMessageTokens();
foreach ($e->getRows() as $row) {
$messageTokens = $e->getTokenProcessor()->getMessageTokens();
foreach ($e->getRows() as $row) {
+ /** @var int $contactId */
$contactId = $row->context['contactId'];
if (empty($row->context['contact'])) {
$params = array(
$contactId = $row->context['contactId'];
if (empty($row->context['contact'])) {
$params = array(
@@
-83,6
+84,10
@@
class TokenCompatSubscriber implements EventSubscriberInterface {
$row->context['controller']
);
$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);
}
}
$row->context('contact', $contact);
}
}