Skip to content

Commit c25e8a0

Browse files
authored
Merge pull request #13 from byjg/5.0
Fix FileSystemCacheEngine::clear()
2 parents f4f0c6f + 139bef7 commit c25e8a0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Psr16/FileSystemCacheEngine.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,9 @@ public function clear(): bool
204204
$patternKey = $this->fixKey('*');
205205
$list = glob($patternKey);
206206
foreach ($list as $file) {
207-
unlink($file);
207+
if (file_exists($file)) {
208+
unlink($file);
209+
}
208210
}
209211
return true;
210212
}

0 commit comments

Comments
 (0)