diff options
Diffstat (limited to 'vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php')
-rw-r--r-- | vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php index 200c11bb5..2ffb896fa 100644 --- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php +++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php @@ -138,7 +138,7 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data * test if cache is valid * * @api Smarty::isCached() - * @link http://www.smarty.net/docs/en/api.is.cached.tpl + * @link https://www.smarty.net/docs/en/api.is.cached.tpl * * @param null|string|\Smarty_Internal_Template $template the resource handle of the template file or template * object @@ -199,6 +199,12 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data try { $_smarty_old_error_level = isset($smarty->error_reporting) ? error_reporting($smarty->error_reporting) : null; + + if ($smarty->isMutingUndefinedOrNullWarnings()) { + $errorHandler = new Smarty_Internal_ErrorHandler(); + $errorHandler->activate(); + } + if ($this->_objType === 2) { /* @var Smarty_Internal_Template $this */ $template->tplFunctions = $this->tplFunctions; @@ -242,6 +248,11 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data } } } + + if (isset($errorHandler)) { + $errorHandler->deactivate(); + } + if (isset($_smarty_old_error_level)) { error_reporting($_smarty_old_error_level); } @@ -250,6 +261,10 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data while (ob_get_level() > $level) { ob_end_clean(); } + if (isset($errorHandler)) { + $errorHandler->deactivate(); + } + if (isset($_smarty_old_error_level)) { error_reporting($_smarty_old_error_level); } @@ -261,7 +276,7 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data * Registers plugin to be used in templates * * @api Smarty::registerPlugin() - * @link http://www.smarty.net/docs/en/api.register.plugin.tpl + * @link https://www.smarty.net/docs/en/api.register.plugin.tpl * * @param string $type plugin type * @param string $name name of template tag @@ -281,7 +296,7 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data * load a filter of specified type and name * * @api Smarty::loadFilter() - * @link http://www.smarty.net/docs/en/api.load.filter.tpl + * @link https://www.smarty.net/docs/en/api.load.filter.tpl * * @param string $type filter type * @param string $name filter name @@ -298,7 +313,7 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data * Registers a filter function * * @api Smarty::registerFilter() - * @link http://www.smarty.net/docs/en/api.register.filter.tpl + * @link https://www.smarty.net/docs/en/api.register.filter.tpl * * @param string $type filter type * @param callable $callback @@ -316,7 +331,7 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data * Registers object to be used in templates * * @api Smarty::registerObject() - * @link http://www.smarty.net/docs/en/api.register.object.tpl + * @link https://www.smarty.net/docs/en/api.register.object.tpl * * @param string $object_name * @param object $object the referenced PHP object to register |