From 153252fa4e2facf57dd1efebfb8470918ed27f7f Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Tue, 9 May 2023 18:23:14 +1200 Subject: [PATCH] Fix locale leaking into tokens --- Civi/Token/TokenCompatSubscriber.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Civi/Token/TokenCompatSubscriber.php b/Civi/Token/TokenCompatSubscriber.php index b349f9c380..7aad811eac 100644 --- a/Civi/Token/TokenCompatSubscriber.php +++ b/Civi/Token/TokenCompatSubscriber.php @@ -72,7 +72,7 @@ class TokenCompatSubscriber implements EventSubscriberInterface { foreach ($e->context['smartyTokenAlias'] ?? [] as $smartyName => $tokenName) { $tokenParts = explode('|', $tokenName); $modifier = $tokenParts[1] ?? ''; - $smartyVars[$smartyName] = \CRM_Utils_Array::pathGet($e->row->tokens, explode('.', $tokenParts[0]), $e->context['locale'] ?? NULL); + $smartyVars[$smartyName] = \CRM_Utils_Array::pathGet($e->row->tokens, explode('.', $tokenParts[0]), ''); if ($smartyVars[$smartyName] instanceof \Brick\Money\Money) { // TODO: We should reuse the filters from TokenProcessor::filterTokenValue() if ($modifier === 'crmMoney') { -- 2.25.1