From 586373da706ee72d832b7e54b460a07555b9bd54 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Thu, 3 Aug 2023 21:08:48 +0530 Subject: [PATCH] Fix missing index.php file --- .../smarty_internal_method_clearcompiledtemplate.php | 5 +++++ 1 file changed, 5 insertions(+) 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')