From c585decebf6c35fc7f4eaedb80a860089f045464 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 17 Dec 2018 09:29:25 +0200 Subject: [ci skip] Merge pull request #5651 from pawelkg/develop Test if cache file is writable before unlink it --- system/libraries/Cache/drivers/Cache_file.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system') 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; } -- cgit v1.2.3-24-g4f1b