diff --git a/tools/smarty/sysplugins/smarty_internal_method_clearcompiledtemplate.php b/tools/smarty/sysplugins/smarty_internal_method_clearcompiledtemplate.php index bf4929807..d1b21ee68 100644 --- a/tools/smarty/sysplugins/smarty_internal_method_clearcompiledtemplate.php +++ b/tools/smarty/sysplugins/smarty_internal_method_clearcompiledtemplate.php @@ -114,6 +114,11 @@ class Smarty_Internal_Method_ClearCompiledTemplate $unlink = true; } } + + if (substr($_filepath, -9) == 'index.php') { + $unlink = false; + } + if ($unlink && is_file($_filepath) && @unlink($_filepath)) { $_count++; if (function_exists('opcache_invalidate')