summaryrefslogtreecommitdiffstats
path: root/system/database
diff options
context:
space:
mode:
Diffstat (limited to 'system/database')
-rw-r--r--system/database/DB_driver.php4
-rw-r--r--system/database/drivers/mysqli/mysqli_result.php2
2 files changed, 3 insertions, 3 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);
}
diff --git a/system/database/drivers/mysqli/mysqli_result.php b/system/database/drivers/mysqli/mysqli_result.php
index 586c29252..692d4f729 100644
--- a/system/database/drivers/mysqli/mysqli_result.php
+++ b/system/database/drivers/mysqli/mysqli_result.php
@@ -114,7 +114,7 @@ class CI_DB_mysqli_result extends CI_DB_result {
*/
function free_result()
{
- if (is_resource($this->result_id))
+ if (is_object($this->result_id))
{
mysqli_free_result($this->result_id);
$this->result_id = FALSE;