diff options
author | Andrey Andreev <narf@devilix.net> | 2018-12-17 08:29:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-17 08:29:25 +0100 |
commit | 90ebf3b7d243cbaed06c58b0fbdb2c07d8a631e9 (patch) | |
tree | b9bc33588c0ad3bc0fadd1e7b13deba4b45a75d0 /system/libraries/Cache/drivers/Cache_file.php | |
parent | 37d9b303163cd1256743d06750c1c742bd464823 (diff) | |
parent | eb8f21e8bf051c1a5cba0a08a07fef5d10132750 (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/Cache_file.php')
-rw-r--r-- | system/libraries/Cache/drivers/Cache_file.php | 2 |
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; } |