From 5780d8b2078126f8eb5738658fceadd38c66fe5b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 4 Mar 2013 07:38:16 +0200 Subject: Fix #2298 --- system/database/DB_result.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'system/database/DB_result.php') 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; } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b