From 640183393356aacf6251b74493f9c317d5a64e8b Mon Sep 17 00:00:00 2001 From: "uwe.tews@googlemail.com" Date: Fri, 12 Nov 2010 14:53:49 +0000 Subject: [PATCH] - reactivated $error_reporting property handling --- change_log.txt | 7 +++++++ libs/Smarty.class.php | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/change_log.txt b/change_log.txt index 84e7df33..f9701406 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,3 +1,10 @@ +12/11/2010 +- reactivated $error_reporting property handling + +===== Smarty 3.0.0 ===== + + + 11/11/2010 - major update including some API changes diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 5809a884..b67cab4d 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -318,6 +318,9 @@ class Smarty extends Smarty_Internal_Data { // create template object if necessary ($template instanceof $this->template_class)? $_template = $template : $_template = $this->createTemplate ($template, $cache_id, $compile_id, $parent); + if (isset($this->error_reporting)) { + $_smarty_old_error_level = error_reporting($this->error_reporting); + } // obtain data for cache modified check if ($this->cache_modified_check && $this->caching && $display) { $_isCached = $_template->isCached() && !$_template->has_nocache_code; @@ -334,6 +337,9 @@ class Smarty extends Smarty_Internal_Data { $_output = $_template->getRenderedTemplate(); } $_template->rendered_content = null; + if (isset($this->error_reporting)) { + error_reporting($_smarty_old_error_level); + } // display or fetch if ($display) { if ($this->caching && $this->cache_modified_check) {