- improvement sha1() for array keys longer than 150 characters

This commit is contained in:
rodneyrehm
2011-10-21 12:10:41 +00:00
parent 37719ce858
commit 6baca38bf1
6 changed files with 20 additions and 1 deletions
@@ -155,6 +155,9 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource {
// remove from template cache
$tpl->source; // have the template registered before unset()
$_templateId = $tpl->source->unique_resource . $tpl->cache_id . $tpl->compile_id;
if (isset($_templateId[150])) {
$_templateId = sha1($_templateId);
}
unset($smarty->template_objects[$_templateId]);
if ($tpl->source->exists) {