From 2601e26d2c6d77a0f016a92e0191158c22739c91 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Tue, 2 Nov 2021 00:41:15 +0000 Subject: [PATCH] [REF] Fix pseduoconstant token rendering for contributions via legacy way on php8 and include campaign_id pseudoconsntants as well --- CRM/Utils/Token.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CRM/Utils/Token.php b/CRM/Utils/Token.php index 421e7cefc1..3dddf5602f 100644 --- a/CRM/Utils/Token.php +++ b/CRM/Utils/Token.php @@ -1548,12 +1548,17 @@ class CRM_Utils_Token { 'contribution_status_id:label', 'contribution_status_id:name', 'is_template:label', + 'campaign_id:label', + 'campaign_id:name', ] ); foreach ($tokens as $token) { if (!empty($token['name'])) { $tokens[$token['name']] = []; } + elseif (is_string($token) && strpos($token, ':') !== FALSE) { + $tokens[$token] = []; + } } Civi::$statics[__CLASS__][__FUNCTION__][$key] = array_keys($tokens); } -- 2.25.1