- removed internal muteExpectedErrors() calls in favor of having the implementor call this once from his application

- optimized muteExpectedErrors() to pass errors to the latest registered error handler, if appliccable

error muting is now a global thing. this was done because of the overhead set_error_handler imposes and the fact, that only a few people really "need" this. 

The decision was made by uwe.tews and rodneyrehm. (just in case anyone asks…)
This commit is contained in:
rodneyrehm
2011-09-24 12:56:52 +00:00
parent 537285032c
commit d0228e96ea
7 changed files with 34 additions and 40 deletions

View File

@@ -35,7 +35,6 @@ class Smarty_Internal_Resource_PHP extends Smarty_Resource_Uncompiled {
*/
public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null)
{
Smarty::muteExpectedErrors();
$source->filepath = $this->buildFilepath($source, $_template);
if ($source->filepath !== false) {
@@ -49,7 +48,6 @@ class Smarty_Internal_Resource_PHP extends Smarty_Resource_Uncompiled {
$source->exists = !!$source->timestamp;
}
}
Smarty::unmuteExpectedErrors();
}
/**
@@ -60,9 +58,7 @@ class Smarty_Internal_Resource_PHP extends Smarty_Resource_Uncompiled {
*/
public function populateTimestamp(Smarty_Template_Source $source)
{
Smarty::muteExpectedErrors();
$source->timestamp = @filemtime($source->filepath);
Smarty::unmuteExpectedErrors();
$source->exists = !!$source->timestamp;
}