Skip to content

Commit d5d194c

Browse files
committed
Add additional file check before unlink
1 parent dfd3555 commit d5d194c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

system/Cache/Handlers/FileHandler.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,11 @@ protected function getItem(string $key)
322322

323323
if ($data['ttl'] > 0 && time() > $data['time'] + $data['ttl'])
324324
{
325-
unlink($this->path . $key);
325+
// If the file is still there then remove it
326+
if (is_file($this->path . $key))
327+
{
328+
unlink($this->path . $key);
329+
}
326330

327331
return false;
328332
}

0 commit comments

Comments
 (0)