diff options
author | Andrey Andreev <narf@devilix.net> | 2016-08-11 13:13:11 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2016-08-11 13:17:14 +0200 |
commit | 04649d9dd5fbdf2d032eb3e4b969a4788d9451f0 (patch) | |
tree | eb9087429b368aba61826d1de3a90cdbfaf36d1b /system | |
parent | 9180a1264dc536c34e5cc8a0e44bb399a8ba484f (diff) |
Merge pull request #4761 from tianhe1986/develop_cache_file_check
Cache_file: use is_file() for checking instead of file_exists().
Diffstat (limited to 'system')
-rw-r--r-- | system/libraries/Cache/drivers/Cache_file.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/system/libraries/Cache/drivers/Cache_file.php b/system/libraries/Cache/drivers/Cache_file.php index e1ce16a5a..f579eaae4 100644 --- a/system/libraries/Cache/drivers/Cache_file.php +++ b/system/libraries/Cache/drivers/Cache_file.php @@ -120,7 +120,7 @@ class CI_Cache_file extends CI_Driver { */ public function delete($id) { - return file_exists($this->_cache_path.$id) ? unlink($this->_cache_path.$id) : FALSE; + return is_file($this->_cache_path.$id) ? unlink($this->_cache_path.$id) : FALSE; } // ------------------------------------------------------------------------ @@ -216,7 +216,7 @@ class CI_Cache_file extends CI_Driver { */ public function get_metadata($id) { - if ( ! file_exists($this->_cache_path.$id)) + if ( ! is_file($this->_cache_path.$id)) { return FALSE; } |