X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=Civi%2FToken%2FTokenCompatSubscriber.php;h=8e2ac735ba1b176cb5216da295183ec7733282b9;hb=1b03e966c9e3433b724a7bedfde32fbe49389056;hp=ccd70813bf00efce9d2f1efa43ae23bc03588896;hpb=831d4f8f151ab9d0aa8960fc7cb8f22905db1149;p=civicrm-core.git diff --git a/Civi/Token/TokenCompatSubscriber.php b/Civi/Token/TokenCompatSubscriber.php index ccd70813bf..8e2ac735ba 100644 --- a/Civi/Token/TokenCompatSubscriber.php +++ b/Civi/Token/TokenCompatSubscriber.php @@ -90,7 +90,7 @@ class TokenCompatSubscriber implements EventSubscriberInterface { // less randomly. \CRM_Utils_Hook::tokenValues($contactArray, (array) $contactId, - empty($row->context['mailingJob']) ? NULL : $row->context['mailingJob']->id, + empty($row->context['mailingJobId']) ? NULL : $row->context['mailingJobId'], $messageTokens, $row->context['controller'] ); @@ -112,7 +112,8 @@ class TokenCompatSubscriber implements EventSubscriberInterface { $isHtml = ($e->message['format'] == 'text/html'); $useSmarty = !empty($e->context['smarty']); - $e->string = \CRM_Utils_Token::replaceDomainTokens($e->string, \CRM_Core_BAO_Domain::getDomain(), $isHtml, $e->message['tokens'], $useSmarty); + $domain = \CRM_Core_BAO_Domain::getDomain(); + $e->string = \CRM_Utils_Token::replaceDomainTokens($e->string, $domain, $isHtml, $e->message['tokens'], $useSmarty); if (!empty($e->context['contact'])) { $e->string = \CRM_Utils_Token::replaceContactTokens($e->string, $e->context['contact'], $isHtml, $e->message['tokens'], TRUE, $useSmarty);