mirror of
https://github.com/smarty-php/smarty.git
synced 2025-12-06 01:09:25 +01:00
- 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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user