summaryrefslogtreecommitdiffstats
path: root/system/libraries/Cache/drivers
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2018-12-17 08:29:25 +0100
committerAndrey Andreev <narf@devilix.net>2018-12-17 08:30:19 +0100
commitc585decebf6c35fc7f4eaedb80a860089f045464 (patch)
tree068144121a6a84434770ef404e723e2aec0cdd9d /system/libraries/Cache/drivers
parent41bba2fea6fafa315db0a21093722f920455e3b1 (diff)
[ci skip] Merge pull request #5651 from pawelkg/develop
Test if cache file is writable before unlink it
Diffstat (limited to 'system/libraries/Cache/drivers')
-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 4f383032f..021c2629e 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;
}