From 2a6b5479ddaf8306c163dc70f8cc2d7888b9357c Mon Sep 17 00:00:00 2001 From: messju Date: Sun, 23 Nov 2003 08:18:12 +0000 Subject: [PATCH] add property $tpl_error_reporting --- NEWS | 1 + libs/Smarty.class.php | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index ce9c8d20..55f23d18 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ + - add property $tpl_error_reporting (messju) - remove property $undefined. "null" is used literally instead (messju) Version 2.6.0 (Nov 19, 2003) diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index bb75e355..f266c876 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -113,6 +113,13 @@ class Smarty */ var $debugging = false; + /** + * When set, smarty does uses this value as error_reporting-level. + * + * @var boolean + */ + var $tpl_error_reporting = null; + /** * This is the path to the debug console template. If not set, * the default one will be used. @@ -1162,7 +1169,8 @@ class Smarty { static $_cache_info = array(); - $_smarty_old_error_level = $this->debugging ? error_reporting() : error_reporting(error_reporting() & ~E_NOTICE); + $_smarty_old_error_level = $this->debugging ? error_reporting() : error_reporting(isset($this->tpl_error_reporting) + ? $this->tpl_error_reporting : error_reporting() & ~E_NOTICE); if (!$this->debugging && $this->debugging_ctrl == 'URL' && @strstr($GLOBALS['HTTP_SERVER_VARS']['QUERY_STRING'], $this->_smarty_debug_id)) {