add property $tpl_error_reporting

This commit is contained in:
messju
2003-11-23 08:18:12 +00:00
parent 1c604216e3
commit 2a6b5479dd
2 changed files with 10 additions and 1 deletions

1
NEWS
View File

@@ -1,3 +1,4 @@
- add property $tpl_error_reporting (messju)
- remove property $undefined. "null" is used literally instead (messju) - remove property $undefined. "null" is used literally instead (messju)
Version 2.6.0 (Nov 19, 2003) Version 2.6.0 (Nov 19, 2003)

View File

@@ -113,6 +113,13 @@ class Smarty
*/ */
var $debugging = false; 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, * This is the path to the debug console template. If not set,
* the default one will be used. * the default one will be used.
@@ -1162,7 +1169,8 @@ class Smarty
{ {
static $_cache_info = array(); 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' if (!$this->debugging && $this->debugging_ctrl == 'URL'
&& @strstr($GLOBALS['HTTP_SERVER_VARS']['QUERY_STRING'], $this->_smarty_debug_id)) { && @strstr($GLOBALS['HTTP_SERVER_VARS']['QUERY_STRING'], $this->_smarty_debug_id)) {