mirror of
https://github.com/smarty-php/smarty.git
synced 2026-05-05 04:04:10 +02:00
- improvement use is_file() checks to avoid errors suppressed by @ which could still cause problems (https://github.com/smarty-php/smarty/issues/24)
This commit is contained in:
@@ -35,8 +35,10 @@ class Smarty_Internal_Extension_DefaultTemplateHandler
|
||||
$_return = call_user_func_array($default_handler,
|
||||
array($source->type, $source->name, &$_content, &$_timestamp, $source->smarty));
|
||||
if (is_string($_return)) {
|
||||
$source->timestamp = @filemtime($_return);
|
||||
$source->exists = !!$source->timestamp;
|
||||
$source->exists = is_file($_return);
|
||||
if ($source->exists) {
|
||||
$source->timestamp = filemtime($_return);
|
||||
}
|
||||
$source->filepath = $_return;
|
||||
} elseif ($_return === true) {
|
||||
$source->content = $_content;
|
||||
|
||||
Reference in New Issue
Block a user