[REF] Fix pseduoconstant token rendering for contributions via legacy way on php8...
authorSeamus Lee <seamuslee001@gmail.com>
Tue, 2 Nov 2021 00:41:15 +0000 (00:41 +0000)
committerSeamus Lee <seamuslee001@gmail.com>
Tue, 2 Nov 2021 00:41:15 +0000 (00:41 +0000)
CRM/Utils/Token.php

index 421e7cefc16ef10c7294e055473e71e6e13491c2..3dddf5602f09285cb0cd813e8aeb047b4c91fec5 100644 (file)
@@ -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);
     }