summaryrefslogtreecommitdiffstats
path: root/system/database/DB_result.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2013-03-04 06:38:16 +0100
committerAndrey Andreev <narf@bofh.bg>2013-03-04 06:38:16 +0100
commit5780d8b2078126f8eb5738658fceadd38c66fe5b (patch)
tree1d64a828213580691b7163e997cac26538268032 /system/database/DB_result.php
parentc59498655bd9e919812ad4da8e7c7be1e0e73100 (diff)
Fix #2298
Diffstat (limited to 'system/database/DB_result.php')
-rw-r--r--system/database/DB_result.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/system/database/DB_result.php b/system/database/DB_result.php
index a044fd5dc..41a851777 100644
--- a/system/database/DB_result.php
+++ b/system/database/DB_result.php
@@ -478,12 +478,9 @@ class CI_DB_result {
return NULL;
}
- if (isset($result[$this->current_row + 1]))
- {
- ++$this->current_row;
- }
-
- return $result[$this->current_row];
+ return isset($result[$this->current_row + 1])
+ ? $result[++$this->current_row]
+ : NULL;
}
// --------------------------------------------------------------------