From 395e2df7ff74fe9bf4c669dea3f6ae5eb46b081e Mon Sep 17 00:00:00 2001 From: RJ garcia Date: Thu, 21 Mar 2013 10:48:24 -0500 Subject: Making a performance modification to DB_driver list_fields() Signed-off-by: RJ garcia --- system/database/DB_driver.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'system') diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 18dbbc76e..04490c824 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -1208,13 +1208,8 @@ abstract class CI_DB_driver { } else { - /* We have no other choice but to just get the first element's key. - * Due to array_shift() accepting it's argument by reference, if - * E_STRICT is on, this would trigger a warning. So we'll have to - * assign it first. - */ - $key = array_keys($row); - $key = array_shift($key); + // We have no other choice but to just get the first element's key. + $key = key($row); } } -- cgit v1.2.3-24-g4f1b