summaryrefslogtreecommitdiffstats
path: root/system/database/DB.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/DB.php')
-rw-r--r--system/database/DB.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/system/database/DB.php b/system/database/DB.php
index f7476a68e..62237440f 100644
--- a/system/database/DB.php
+++ b/system/database/DB.php
@@ -24,8 +24,6 @@
*/
function DB($params = '', $return = FALSE, $active_record = FALSE)
{
- $obj =& get_instance();
-
// Do we even need to load the database class?
if (class_exists('CI_DB') AND $return == FALSE AND $active_record == FALSE)
{
@@ -92,8 +90,9 @@ function DB($params = '', $return = FALSE, $active_record = FALSE)
{
return $DB;
}
-
- $obj->db =& $DB;
+
+ $CI =& get_instance();
+ $CI->db =& $DB;
}