mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-08 01:32:59 +02:00
related to #1693 changed smarty version to 4.1.0
This commit is contained in:
committed by
plegall
parent
25570529a7
commit
ecfa090d6d
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user