summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorPaweł Kłopotek-Główczewski <pawelkg@pawelkg.com>2018-12-09 19:32:10 +0100
committerPaweł Kłopotek-Główczewski <pawelkg@pawelkg.com>2018-12-09 19:32:10 +0100
commitfb464f184cc06df7ecaad19ba73b9e73110c2b17 (patch)
tree5298869e8cb097a4c3daea8a43012481e065f7bb /system
parent37d9b303163cd1256743d06750c1c742bd464823 (diff)
Test if cache file is writable before unlink it
Diffstat (limited to 'system')
-rw-r--r--system/libraries/Cache/drivers/Cache_file.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/libraries/Cache/drivers/Cache_file.php b/system/libraries/Cache/drivers/Cache_file.php
index 56dbb9974..cc6018787 100644
--- a/system/libraries/Cache/drivers/Cache_file.php
+++ b/system/libraries/Cache/drivers/Cache_file.php
@@ -276,7 +276,7 @@ class CI_Cache_file extends CI_Driver {
if ($data['ttl'] > 0 && time() > $data['time'] + $data['ttl'])
{
- unlink($this->_cache_path.$id);
+ file_exists($this->_cache_path.$id) && unlink($this->_cache_path.$id);
return FALSE;
}