diff --git a/libs/sysplugins/smarty_internal_method_compilealltemplates.php b/libs/sysplugins/smarty_internal_method_compilealltemplates.php
index 3325cd8e..95a500c4 100644
--- a/libs/sysplugins/smarty_internal_method_compilealltemplates.php
+++ b/libs/sysplugins/smarty_internal_method_compilealltemplates.php
@@ -98,7 +98,7 @@ class Smarty_Internal_Method_CompileAllTemplates
}
// free memory
unset($_tpl);
- $_smarty->_cache['template_objects'] = array();
+ $_smarty->_clearTemplateCache();
if ($max_errors !== null && $_error_count == $max_errors) {
echo "\n
too many errors\n";
exit();
@@ -108,4 +108,4 @@ class Smarty_Internal_Method_CompileAllTemplates
echo "\n
";
return $_count;
}
-}
+}
\ No newline at end of file