summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/database/DB_result.php11
1 files changed, 3 insertions, 8 deletions
diff --git a/system/database/DB_result.php b/system/database/DB_result.php
index 574cd9858..25b4fb911 100644
--- a/system/database/DB_result.php
+++ b/system/database/DB_result.php
@@ -373,17 +373,12 @@ class CI_DB_result {
/**
* Returns an unbuffered row and move pointer to next row
*
- * @return object
+ * @return mixed either a result object or array
*/
public function unbuffered_row($type = 'object')
{
- if ($type == 'object')
- {
- return $this->_fetch_object();
- } else
- {
- return $this->_fetch_assoc();
- }
+ return ($type !== 'array') ? $this->_fetch_object() : $this->_fetch_assoc();
+
}
// --------------------------------------------------------------------