TokenProcessor - Tweak error message
authorTim Otten <totten@civicrm.org>
Wed, 15 Jun 2022 09:16:18 +0000 (02:16 -0700)
committerTim Otten <totten@civicrm.org>
Thu, 16 Jun 2022 01:31:48 +0000 (18:31 -0700)
Civi/Token/TokenProcessor.php

index 7ffdc64ffb1f949b8963acdb5936eee7d1636827..d2f345aece792cc770a7a7314a98651454e56158 100644 (file)
@@ -480,7 +480,7 @@ class TokenProcessor {
           return $value->getAmount();
 
         default:
-          throw new \CRM_Core_Exception("Invalid token filter: $filter");
+          throw new \CRM_Core_Exception("Invalid token filter: " . json_encode($filter, JSON_UNESCAPED_SLASHES));
       }
     }
 
@@ -502,7 +502,7 @@ class TokenProcessor {
         }
 
       default:
-        throw new \CRM_Core_Exception("Invalid token filter: $filter");
+        throw new \CRM_Core_Exception("Invalid token filter: " . json_encode($filter, JSON_UNESCAPED_SLASHES));
     }
   }