mirror of
https://github.com/smarty-php/smarty.git
synced 2025-12-03 15:59:32 +01:00
- added $error_muting to suppress error messages even for badly implemented error_handlers
- reverted r4301
This commit is contained in:
@@ -35,6 +35,7 @@ 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) {
|
||||
@@ -48,6 +49,7 @@ class Smarty_Internal_Resource_PHP extends Smarty_Resource_Uncompiled {
|
||||
$source->exists = !!$source->timestamp;
|
||||
}
|
||||
}
|
||||
Smarty::unmuteExpectedErrors();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -58,7 +60,9 @@ 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