summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authoruwetews <uwe.tews@googlemail.com>2015-12-29 16:54:15 +0100
committeruwetews <uwe.tews@googlemail.com>2015-12-29 16:54:15 +0100
commit34062d45b7e0f3e8ab4509d284cc2f80adcfd5b6 (patch)
treedc7f40ddd919ad45491d7b5958a4bd2f1de32bcb /libs
parent59b3a530899c5b47876002ce5433799782002cc0 (diff)
downloadsmarty-34062d45b7e0f3e8ab4509d284cc2f80adcfd5b6.tar.gz
smarty-34062d45b7e0f3e8ab4509d284cc2f80adcfd5b6.tar.bz2
smarty-34062d45b7e0f3e8ab4509d284cc2f80adcfd5b6.zip
- bugfix Smarty::error_reporting was not observed when display() or fetch() was called on template objects https://github.com/smarty-php/smarty/issues/145
Diffstat (limited to 'libs')
-rw-r--r--libs/sysplugins/smarty_internal_templatebase.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/sysplugins/smarty_internal_templatebase.php b/libs/sysplugins/smarty_internal_templatebase.php
index b0282b70..3c05246c 100644
--- a/libs/sysplugins/smarty_internal_templatebase.php
+++ b/libs/sysplugins/smarty_internal_templatebase.php
@@ -174,7 +174,7 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data
$level = ob_get_level();
try {
$_smarty_old_error_level =
- ($this->_objType == 1 && isset($smarty->error_reporting)) ? error_reporting($smarty->error_reporting) :
+ isset($smarty->error_reporting) ? error_reporting($smarty->error_reporting) :
null;
if ($function == 2) {
if ($template->caching) {
@@ -204,6 +204,9 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data
while (ob_get_level() > $level) {
ob_end_clean();
}
+ if (isset($_smarty_old_error_level)) {
+ error_reporting($_smarty_old_error_level);
+ }
throw $e;
}
}