Merge pull request #5112 from cerealbeer/develop

read() in DB_cache fails when catching E_WARNING with custom error handler
diff --git a/system/database/DB_cache.php b/system/database/DB_cache.php
index b74c319..7c8ee5f 100644
--- a/system/database/DB_cache.php
+++ b/system/database/DB_cache.php
@@ -143,7 +143,7 @@
 		$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;
 		}