Skip to content

Commit cafc8b4

Browse files
committed
Merge pull request #156 from Runalyze/final
add file_exists check for file driver delete function
2 parents c0615b7 + 00102fd commit cafc8b4

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)