- suppress warnings on unlink caused by race conditions

- correct line number on unknown tag error message
This commit is contained in:
Uwe.Tews
2009-11-23 22:31:22 +00:00
parent 963b13b0af
commit 4925a98949
7 changed files with 37 additions and 21 deletions
@@ -130,10 +130,10 @@ class Smarty_Internal_CacheResource_File {
(isset($resource_name) && (string)$_file == $_dir . $_resource_part)) {
if (isset($exp_time)) {
if (time() - @filemtime($_file) >= $exp_time) {
$_count += unlink((string) $_file) ? 1 : 0;
$_count += @unlink((string) $_file) ? 1 : 0;
}
} else {
$_count += unlink((string) $_file) ? 1 : 0;
$_count += @unlink((string) $_file) ? 1 : 0;
}
}
}