summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2018-12-17 08:29:25 +0100
committerGitHub <noreply@github.com>2018-12-17 08:29:25 +0100
commit90ebf3b7d243cbaed06c58b0fbdb2c07d8a631e9 (patch)
treeb9bc33588c0ad3bc0fadd1e7b13deba4b45a75d0 /system
parent37d9b303163cd1256743d06750c1c742bd464823 (diff)
parenteb8f21e8bf051c1a5cba0a08a07fef5d10132750 (diff)
[ci skip] Merge pull request #5651 from pawelkg/develop
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..c93064cd8 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;
}