summaryrefslogtreecommitdiffstats
path: root/system/database/DB_cache.php
diff options
context:
space:
mode:
authorGiuseppe Marcelli <giuseppem+bitbucket@gmail.com>2017-05-09 23:30:14 +0200
committerGiuseppe Marcelli <giuseppem+bitbucket@gmail.com>2017-05-09 23:30:14 +0200
commit3bb650404199a3cf3ae427a42086c4f6e79a86c1 (patch)
tree512f6ccb7b1e1a152c813b8af152da5d68b2b7c3 /system/database/DB_cache.php
parent79a50e61b3257eea757ead7e1951fd463faea495 (diff)
read() in DB_cache does not fail when catching E_WARNING with custom error handler
Diffstat (limited to 'system/database/DB_cache.php')
-rw-r--r--system/database/DB_cache.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/database/DB_cache.php b/system/database/DB_cache.php
index b74c31924..1c188234a 100644
--- a/system/database/DB_cache.php
+++ b/system/database/DB_cache.php
@@ -143,7 +143,7 @@ class CI_DB_Cache {
$segment_two = ($this->CI->uri->segment(2) == FALSE) ? 'index' : $this->CI->uri->segment(2);
$filepath = $this->db->cachedir.$segment_one.'+'.$segment_two.'/'.md5($sql);
- if (FALSE === ($cachedata = @file_get_contents($filepath)))
+ if ( ! is_file($filepath) OR FALSE === ($cachedata = @file_get_contents($filepath)))
{
return FALSE;
}