summaryrefslogtreecommitdiffstats
path: root/system/libraries/Cache
diff options
context:
space:
mode:
authortianhe1986 <w1s2j3229@163.com>2016-08-11 06:40:47 +0200
committertianhe1986 <w1s2j3229@163.com>2016-08-11 06:40:47 +0200
commite1f76634b6c658680c2ea869dc1bcc38828c7da0 (patch)
treef47b7c15a8fb71e13970e936b8e303d727253e02 /system/libraries/Cache
parentc4bd43432df03e4f4835c7689c8ed722cd2c3020 (diff)
Cache_file: use is_file() for checking instead of file_exists().
Signed-off-by: tianhe1986 <w1s2j3229@163.com>
Diffstat (limited to 'system/libraries/Cache')
-rw-r--r--system/libraries/Cache/drivers/Cache_file.php4
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;
}