summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/database/DB_result.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/system/database/DB_result.php b/system/database/DB_result.php
index 53a23a8be..fb3cff340 100644
--- a/system/database/DB_result.php
+++ b/system/database/DB_result.php
@@ -313,18 +313,19 @@ class CI_DB_result {
*/
public function custom_row_object($n, $type)
{
- $result = $this->custom_result_object($type);
- if (count($result) === 0)
+ isset($this->custom_result_object[$type]) OR $this->custom_result_object($type);
+
+ if (count($this->custom_result_object[$type]) === 0)
{
return NULL;
}
- if ($n !== $this->current_row && isset($result[$n]))
+ if ($n !== $this->current_row && isset($this->custom_result_object[$type][$n]))
{
$this->current_row = $n;
}
- return $result[$this->current_row];
+ return $this->custom_result_object[$type][$this->current_row];
}
// --------------------------------------------------------------------