mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
Add additional file check before unlink
This commit is contained in:
parent
dfd35559c8
commit
d5d194cf36
@ -322,7 +322,11 @@ class FileHandler implements CacheInterface
|
||||
|
||||
if ($data['ttl'] > 0 && time() > $data['time'] + $data['ttl'])
|
||||
{
|
||||
unlink($this->path . $key);
|
||||
// If the file is still there then remove it
|
||||
if (is_file($this->path . $key))
|
||||
{
|
||||
unlink($this->path . $key);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user