diff --git a/change_log.txt b/change_log.txt index ce024609..3157a319 100644 --- a/change_log.txt +++ b/change_log.txt @@ -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 diff --git a/libs/sysplugins/smarty_internal_utility.php b/libs/sysplugins/smarty_internal_utility.php index 2c184cd3..4f25719b 100644 --- a/libs/sysplugins/smarty_internal_utility.php +++ b/libs/sysplugins/smarty_internal_utility.php @@ -216,7 +216,11 @@ class Smarty_Internal_Utility { $_compile_id_part_length = strlen($_compile_id_part); } $_count = 0; - $_compileDirs = new RecursiveDirectoryIterator($_dir); + 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)