- bugfix Smarty::clearCompiledTemplate() threw an Exception if $cache_id was not present in $compile_dir when $use_sub_dirs = true.

-rewrote ClearCompiledTests to cover all possible usage scenarios
This commit is contained in:
rodneyrehm
2011-10-20 12:50:12 +00:00
parent 38af2463df
commit b71323ca24
2 changed files with 6 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
===== trunk =====
20.10.2011
- @silenced unlink() in Smarty_Internal_Write_File since debuggers go haywire without it.
- bugfix Smarty::clearCompiledTemplate() threw an Exception if $cache_id was not present in $compile_dir when $use_sub_dirs = true.
19.10.2011
- revert PHP4 constructor message

View File

@@ -216,7 +216,11 @@ class Smarty_Internal_Utility {
$_compile_id_part_length = strlen($_compile_id_part);
}
$_count = 0;
try {
$_compileDirs = new RecursiveDirectoryIterator($_dir);
} catch (UnexpectedValueException $e) {
return 0;
}
$_compile = new RecursiveIteratorIterator($_compileDirs, RecursiveIteratorIterator::CHILD_FIRST);
foreach ($_compile as $_file) {
if (substr($_file->getBasename(), 0, 1) == '.' || strpos($_file, '.svn') !== false)