Merge pull request #23837 from civicrm/5.51
authorEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 20 Jun 2022 00:52:12 +0000 (12:52 +1200)
committerGitHub <noreply@github.com>
Mon, 20 Jun 2022 00:52:12 +0000 (12:52 +1200)
5.51 to master

1  2 
Civi/Token/TokenProcessor.php

index d2f345aece792cc770a7a7314a98651454e56158,eabab5296f5fcea959c80ac6a535de3b93d6c641..4929a9c14fcb38e059e09621b289471e7398557e
@@@ -500,9 -500,12 +500,12 @@@ class TokenProcessor 
            require_once 'CRM/Core/Smarty/plugins/modifier.crmDate.php';
            return \smarty_modifier_crmDate($value->format('Y-m-d H:i:s'), $filter[1] ?? NULL);
          }
+         if ($value === '') {
+           return $value;
+         }
  
        default:
 -        throw new \CRM_Core_Exception("Invalid token filter: $filter");
 +        throw new \CRM_Core_Exception("Invalid token filter: " . json_encode($filter, JSON_UNESCAPED_SLASHES));
      }
    }