- bugfix concurrent cache updates could create a warning (Forum Topic 21403)

This commit is contained in:
uwe.tews@googlemail.com
2012-04-12 16:55:35 +00:00
parent 4c86e72faa
commit 8c3bcf9eef
2 changed files with 6 additions and 3 deletions
@@ -100,9 +100,11 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource {
public function writeCachedContent(Smarty_Internal_Template $_template, $content)
{
if (Smarty_Internal_Write_File::writeFile($_template->cached->filepath, $content, $_template->smarty) === true) {
$_template->cached->timestamp = filemtime($_template->cached->filepath);
$_template->cached->timestamp = @filemtime($_template->cached->filepath);
$_template->cached->exists = !!$_template->cached->timestamp;
return true;
if ($_template->cached->exists) {
return true;
}
}
return false;
}