From bea65beb164536eb962d2266797eadcbafbe4f0c Mon Sep 17 00:00:00 2001 From: andrey Date: Fri, 22 Mar 2002 19:20:22 +0000 Subject: [PATCH] Turn off notices. --- Smarty.class.php | 6 ++++++ libs/Smarty.class.php | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/Smarty.class.php b/Smarty.class.php index d8ffed8e..75ef2cdc 100644 --- a/Smarty.class.php +++ b/Smarty.class.php @@ -482,6 +482,8 @@ class Smarty \*======================================================================*/ function fetch($_smarty_tpl_file, $_smarty_cache_id = null, $_smarty_compile_id = null, $_smarty_display = false) { + $_smarty_old_error_level = error_reporting(E_ALL & ~E_NOTICE); + if (!$this->debugging && $this->debugging_ctrl == 'URL' && strstr($GLOBALS['QUERY_STRING'], $this->_smarty_debug_id)) { $this->debugging = true; @@ -528,8 +530,10 @@ class Smarty } } echo $_smarty_results; + error_reporting($_smarty_old_error_reporting); return true; } else { + error_reporting($_smarty_old_error_reporting); return $_smarty_results; } } else { @@ -576,8 +580,10 @@ class Smarty echo $this->_generate_debug_output(); } + error_reporting($_smarty_old_error_reporting); return; } else { + error_reporting($_smarty_old_error_reporting); if (isset($_smarty_results)) { return $_smarty_results; } } } diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index d8ffed8e..75ef2cdc 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -482,6 +482,8 @@ class Smarty \*======================================================================*/ function fetch($_smarty_tpl_file, $_smarty_cache_id = null, $_smarty_compile_id = null, $_smarty_display = false) { + $_smarty_old_error_level = error_reporting(E_ALL & ~E_NOTICE); + if (!$this->debugging && $this->debugging_ctrl == 'URL' && strstr($GLOBALS['QUERY_STRING'], $this->_smarty_debug_id)) { $this->debugging = true; @@ -528,8 +530,10 @@ class Smarty } } echo $_smarty_results; + error_reporting($_smarty_old_error_reporting); return true; } else { + error_reporting($_smarty_old_error_reporting); return $_smarty_results; } } else { @@ -576,8 +580,10 @@ class Smarty echo $this->_generate_debug_output(); } + error_reporting($_smarty_old_error_reporting); return; } else { + error_reporting($_smarty_old_error_reporting); if (isset($_smarty_results)) { return $_smarty_results; } } }