Improve the validation check

This commit is contained in:
Alex Tselegidis 2024-03-22 15:11:10 +00:00
parent 80435bd522
commit e7a757e124

View file

@ -274,7 +274,7 @@ class CI_Cache_file extends CI_Driver {
$data = unserialize(file_get_contents($this->_cache_path.$id)); $data = unserialize(file_get_contents($this->_cache_path.$id));
if ($data['ttl'] > 0 && time() > $data['time'] + $data['ttl']) if ($data && $data['ttl'] > 0 && time() > $data['time'] + $data['ttl'])
{ {
file_exists($this->_cache_path.$id) && unlink($this->_cache_path.$id); file_exists($this->_cache_path.$id) && unlink($this->_cache_path.$id);
return FALSE; return FALSE;