diff --git a/change_log.txt b/change_log.txt index 4964fd2f..75f35152 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,6 +1,7 @@ ===== trunk ===== 12.04.2012 -- Smarty did eat the linebreak after the closing tag (Issue 93) +- bugfix Smarty did eat the linebreak after the 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) diff --git a/libs/sysplugins/smarty_internal_cacheresource_file.php b/libs/sysplugins/smarty_internal_cacheresource_file.php index 25195412..e5d20bd6 100644 --- a/libs/sysplugins/smarty_internal_cacheresource_file.php +++ b/libs/sysplugins/smarty_internal_cacheresource_file.php @@ -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; }