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/
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 0f3a1ea..5a55002 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -98,7 +98,7 @@
 	{

 		// 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 @@
 	 */	

 	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 586c292..692d4f7 100644
--- a/system/database/drivers/mysqli/mysqli_result.php
+++ b/system/database/drivers/mysqli/mysqli_result.php
@@ -114,7 +114,7 @@
 	 */		

 	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;

diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 9563556..851ec7a 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -111,6 +111,7 @@
 <ul>

 	<li>Fixed a bug (#3191) with ORIG_PATH_INFO URI parsing.</li>

     <li>Fixed assorted user guide typos (#3453, #4364, #4379, #4399, #4408, #4412, #4448, #4488).</li>

+	<li>Fixed DB Driver and MySQLi result driver checking for resources instead of objects (#3461).</li>

 	<li>Fixed an incorrect documentation of $this-&gt;load-&gt;language (#3520).</li>

 	<li>Fixed an AR_caching error where it wasn't tracking table aliases (#3463).</li>

 	<li>Fixed an AR bug when joining with a table alias and table prefix (#4400).</li>