Update version of smarty to 4.3.1
This commit is contained in:
@@ -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,14 +248,23 @@ 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);
|
||||
}
|
||||
return $result;
|
||||
} catch (Exception $e) {
|
||||
} catch (Throwable $e) {
|
||||
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,11 +276,11 @@ 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
|
||||
* @param callback $callback PHP callback to register
|
||||
* @param callable $callback PHP callback to register
|
||||
* @param bool $cacheable if true (default) this function is cache able
|
||||
* @param mixed $cache_attr caching attributes if any
|
||||
*
|
||||
@@ -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,10 +313,10 @@ 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 callback $callback
|
||||
* @param callable $callback
|
||||
* @param string|null $name optional filter name
|
||||
*
|
||||
* @return \Smarty|\Smarty_Internal_Template
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user