From 9b9c82630a6c51b3741cb33c9c6e7612c2ffce18 Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Fri, 15 Sep 2023 08:51:37 -0400 Subject: [PATCH] e_warning --- CRM/Core/Smarty/plugins/block.localize.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CRM/Core/Smarty/plugins/block.localize.php b/CRM/Core/Smarty/plugins/block.localize.php index 2042827919..47e64fe6be 100644 --- a/CRM/Core/Smarty/plugins/block.localize.php +++ b/CRM/Core/Smarty/plugins/block.localize.php @@ -26,11 +26,19 @@ * {ts} block contents from the template. * @param CRM_Core_Smarty $smarty * The Smarty object. + * @param bool $repeat + * Confusing variable that means it's either the opening tag or you can use + * it to signal back not to repeat. * * @return string * multilingualized query */ -function smarty_block_localize($params, $text, &$smarty) { +function smarty_block_localize($params, $text, &$smarty, &$repeat) { + if ($repeat) { + // For opening tag text is always null + return ''; + } + if (!array_key_exists('multilingual', $smarty->_tpl_vars) || !$smarty->_tpl_vars['multilingual']) { return $text; } -- 2.25.1