Ensure TokenSmary::render returns an array
authorEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 13 Sep 2021 23:01:06 +0000 (11:01 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 13 Sep 2021 23:01:06 +0000 (11:01 +1200)
If there are no messages it should return an empty array

CRM/Core/TokenSmarty.php

index 209d7160e2f89f9c2a42a63a1670fbec042b89a4..4e88337c85b204058a047251c9ad437e4a8200a8 100644 (file)
@@ -41,6 +41,7 @@ class CRM_Core_TokenSmarty {
    * @internal
    */
   public static function render(array $messages, array $tokenContext = [], array $smartyAssigns = []): array {
+    $result = [];
     $tokenContextDefaults = [
       'controller' => __CLASS__,
       'smarty' => TRUE,