mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixing clearCache() so it doesn't delete files named 'empty'. Applies Ceeram's changes without modifying the entire file. Fixes #469
This commit is contained in:
parent
6d13f0d3d1
commit
8a4ad9f51a
1 changed files with 2 additions and 2 deletions
|
@ -578,7 +578,7 @@ if (!function_exists('file_put_contents')) {
|
|||
}
|
||||
|
||||
foreach ($files as $file) {
|
||||
if (is_file($file)) {
|
||||
if (is_file($file) && strrpos($file, DS . 'empty') !== strlen($file) - 6) {
|
||||
@unlink($file);
|
||||
}
|
||||
}
|
||||
|
@ -599,7 +599,7 @@ if (!function_exists('file_put_contents')) {
|
|||
return false;
|
||||
}
|
||||
foreach ($files as $file) {
|
||||
if (is_file($file)) {
|
||||
if (is_file($file) && strrpos($file, DS . 'empty') !== strlen($file) - 6) {
|
||||
@unlink($file);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue