summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2017-05-10 10:36:31 +0200
committerGitHub <noreply@github.com>2017-05-10 10:36:31 +0200
commit362c0a14a987d6462e4062a5fc34099446f9e14f (patch)
tree40ae40e18c9cd1135b86203555807bca4743a17c
parent79a50e61b3257eea757ead7e1951fd463faea495 (diff)
parent07ccf2cbd2d8d09c094337f43feb3c3da91cbb6f (diff)
Merge pull request #5112 from cerealbeer/develop
read() in DB_cache fails when catching E_WARNING with custom error handler
-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..7c8ee5fc9 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;
}