From: Eileen McNaughton Date: Sat, 23 Sep 2023 02:02:50 +0000 (+1200) Subject: Stop accessng _tpl_vars in smarty from property X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1aba80321467ae74bb2829ec41f89fa20e3fc540;p=civicrm-core.git Stop accessng _tpl_vars in smarty from property it's bad practice & it hard fails in smartyv3 --- diff --git a/CRM/Core/Smarty/plugins/function.help.php b/CRM/Core/Smarty/plugins/function.help.php index 754d2ec401..8ceeebaa9f 100644 --- a/CRM/Core/Smarty/plugins/function.help.php +++ b/CRM/Core/Smarty/plugins/function.help.php @@ -27,12 +27,12 @@ * the help html to be inserted */ function smarty_function_help($params, &$smarty) { - if (!isset($params['id']) || !isset($smarty->_tpl_vars['config'])) { + if (!isset($params['id']) || !isset($smarty->get_template_vars()['config'])) { return NULL; } - if (empty($params['file']) && isset($smarty->_tpl_vars['tplFile'])) { - $params['file'] = $smarty->_tpl_vars['tplFile']; + if (empty($params['file']) && isset($smarty->get_template_vars()['tplFile'])) { + $params['file'] = $smarty->get_template_vars()['tplFile']; } elseif (empty($params['file'])) { return NULL;