Add additional file check before unlink

This commit is contained in:
MGatner 2020-02-20 10:06:49 -05:00
parent dfd35559c8
commit d5d194cf36
No known key found for this signature in database
GPG Key ID: BC7C436F28470CC8

View File

@ -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;
}