- avoid possible notice on $smarty->cache->clear(...), $smarty->clear_cache(....)

This commit is contained in:
Uwe.Tews
2010-02-10 18:00:41 +00:00
parent 43ae585e5e
commit 9f5d885835
2 changed files with 5 additions and 2 deletions

View File

@@ -1,3 +1,6 @@
09/02/2010
- avoid possible notice on $smarty->cache->clear(...), $smarty->clear_cache(....)
09/02/2010 09/02/2010
- added $smarty->_tag_stack for tracing block tag hierarchy - added $smarty->_tag_stack for tracing block tag hierarchy

View File

@@ -159,7 +159,7 @@ class Smarty_Internal_CacheResource_File {
} }
} }
// check compile id // check compile id
if (isset($_compile_id) && $_parts[$_parts_count-2 - $_compile_id_offset] != $_compile_id) { if (isset($_compile_id) && (!isset($_parts[$_parts_count-2 - $_compile_id_offset]) || $_parts[$_parts_count-2 - $_compile_id_offset] != $_compile_id)) {
continue; continue;
} }
// check cache id // check cache id
@@ -176,7 +176,7 @@ class Smarty_Internal_CacheResource_File {
// expired ? // expired ?
if (isset($exp_time) && time() - @filemtime($_file) < $exp_time) { if (isset($exp_time) && time() - @filemtime($_file) < $exp_time) {
continue; continue;
} }
$_count += @unlink((string) $_file) ? 1 : 0; $_count += @unlink((string) $_file) ? 1 : 0;
} }
} }