summaryrefslogtreecommitdiffstats
path: root/system/database/DB_driver.php
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2008-05-07 21:58:23 +0200
committerDerek Jones <derek.jones@ellislab.com>2008-05-07 21:58:23 +0200
commit05097759476d3e18f2699503c1c47a30dba702af (patch)
treeb1a109a7062f668aebf7faea5250b6442a8ab9af /system/database/DB_driver.php
parentcd6f9cdbbcdd550e73beccb906fe7ee78714a3f1 (diff)
Added checks for objects in DB driver instead of just resources to accommodate MySQLi, and fixed check in mysqli_result.php checking for a resource.
http://codeigniter.com/bug_tracker/bug/3461/
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r--system/database/DB_driver.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 0f3a1ea0a..5a55002f7 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -98,7 +98,7 @@ class CI_DB_driver {
{
// If an existing DB connection resource is supplied
// there is no need to connect and select the database
- if (is_resource($this->conn_id))
+ if (is_resource($this->conn_id) OR is_object($this->conn_id))
{
return TRUE;
}
@@ -1097,7 +1097,7 @@ class CI_DB_driver {
*/
function close()
{
- if (is_resource($this->conn_id))
+ if (is_resource($this->conn_id) OR is_object($this->conn_id))
{
$this->_close($this->conn_id);
}