summaryrefslogtreecommitdiffstats
path: root/system/libraries/Cache
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-08-11 13:13:11 +0200
committerGitHub <noreply@github.com>2016-08-11 13:13:11 +0200
commitc82e9968326b949d4cdad384f4645b28fa7c2f17 (patch)
treef47b7c15a8fb71e13970e936b8e303d727253e02 /system/libraries/Cache
parentc4bd43432df03e4f4835c7689c8ed722cd2c3020 (diff)
parente1f76634b6c658680c2ea869dc1bcc38828c7da0 (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/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;
}