From 83b2b1cd75d85d78ddcae1f9716984d8acdd7ca6 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 13 Nov 2012 10:58:38 +0200 Subject: Fix some DB_cache-related issues http://codeigniter.com/forums/viewthread/229610/ --- system/database/DB_cache.php | 2 +- system/database/DB_driver.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'system') diff --git a/system/database/DB_cache.php b/system/database/DB_cache.php index 1be80c5c7..db7636450 100644 --- a/system/database/DB_cache.php +++ b/system/database/DB_cache.php @@ -122,7 +122,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 (FALSE === ($cachedata = @file_get_contents($filepath))) { return FALSE; } diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 4fcb6c63c..1193b42f6 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -692,7 +692,7 @@ abstract class CI_DB_driver { // resource ID won't be any good once we've cached the // result object, so we'll have to compile the data // and save it) - $CR = new CI_DB_result(); + $CR = new CI_DB_result($this); $CR->result_object = $RES->result_object(); $CR->result_array = $RES->result_array(); $CR->num_rows = $RES->num_rows(); -- cgit v1.2.3-24-g4f1b