Skip to content

Commit 00102fd

Browse files
committed
add file_exists check for cache delete
need to eliminate php warnings
1 parent c0615b7 commit 00102fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

phpfastcache/3.0.0/drivers/files.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ function driver_get($keyword, $option = array()) {
118118

119119
function driver_delete($keyword, $option = array()) {
120120
$file_path = $this->getFilePath($keyword,true);
121-
if(@unlink($file_path)) {
121+
if(file_exists($file_path) && @unlink($file_path)) {
122122
return true;
123123
} else {
124124
return false;

0 commit comments

Comments
 (0)