- 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

View File

@@ -1,6 +1,7 @@
===== trunk =====
12.04.2012
- Smarty did eat the linebreak after the <?xml...?> closing tag (Issue 93)
- bugfix Smarty did eat the linebreak after the <?xml...?> closing tag (Issue 93)
- bugfix concurrent cache updates could create a warning (Forum Topic 21403)
08.04.2012
- bugfix "\\" was not escaped correctly when generating nocache code (Forum Topic 21364)

View File

@@ -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;
}