cvs: smarty / Smarty.class.php
| From: | Andrei Zmievski | Date: | Mon, 15 Apr 2002 16:39:18 +0000 |
| Subject: | cvs: smarty / Smarty.class.php | ||
| Groups: | php.smarty.cvs | ||
| Request: | Send a blank email to php-smarty-cvs+get-58@lists.php.net to get a copy of this message | ||
andrei Mon Apr 15 12:39:18 2002 EDT
Modified files:
/smarty Smarty.class.php
Log:
Only turn down error notices if $debugging is false.
Index: smarty/Smarty.class.php
diff -u smarty/Smarty.class.php:1.264 smarty/Smarty.class.php:1.265
--- smarty/Smarty.class.php:1.264 Fri Apr 12 10:41:03 2002
+++ smarty/Smarty.class.php Mon Apr 15 12:39:16 2002
@@ -518,7 +518,7 @@
\*======================================================================*/
function fetch($_smarty_tpl_file, $_smarty_cache_id = null, $_smarty_compile_id = null,
$_smarty_display = false)
{
- $_smarty_old_error_level = error_reporting(error_reporting() & ~E_NOTICE);
+ $_smarty_old_error_level = $this->debugging ? error_reporting() :
error_reporting(error_reporting() & ~E_NOTICE);
if (!$this->debugging && $this->debugging_ctrl == 'URL'
&& strstr($GLOBALS['QUERY_STRING'], $this->_smarty_debug_id)) {
@@ -566,10 +566,10 @@
}
}
echo $_smarty_results;
- error_reporting($_smarty_old_error_reporting);
+ error_reporting($_smarty_old_error_level);
return true;
} else {
- error_reporting($_smarty_old_error_reporting);
+ error_reporting($_smarty_old_error_level);
return $_smarty_results;
}
} else {
@@ -616,10 +616,10 @@
echo $this->_generate_debug_output();
}
- error_reporting($_smarty_old_error_reporting);
+ error_reporting($_smarty_old_error_level);
return;
} else {
- error_reporting($_smarty_old_error_reporting);
+ error_reporting($_smarty_old_error_level);
if (isset($_smarty_results)) { return $_smarty_results; }
}
}