[php8-compat] Fix Resources Test issue due to undefined array key addCacheCode
authorSeamus Lee <seamuslee001@gmail.com>
Mon, 7 Jun 2021 20:55:47 +0000 (20:55 +0000)
committerSeamus Lee <seamuslee001@gmail.com>
Mon, 7 Jun 2021 20:55:47 +0000 (20:55 +0000)
CRM/Core/Smarty/plugins/function.crmResURL.php

index 7a9a9b947df00bfd49b7763a115b893a77652b4a..96e67979053f10e990232dffa6f542276bc41743 100644 (file)
@@ -39,5 +39,5 @@ function smarty_function_crmResURL($params, &$smarty) {
   if (!array_key_exists('file', $params)) {
     $params['file'] = NULL;
   }
-  return $res->getUrl($params['ext'], $params['file'], $params['addCacheCode']);
+  return $res->getUrl($params['ext'], $params['file'], $params['addCacheCode'] ?? FALSE);
 }