Merge pull request #752 from abhishek-webkul/gli-912

Fixed: File '/cache/smarty/compile/index.php' gets deleted when clearing cache causing warning on Configuration Information page
This commit is contained in:
Rohit Jain
2023-12-28 16:14:26 +05:30
committed by GitHub

View File

@@ -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')