diff options
author | RJ garcia <rj@bighead.net> | 2013-03-21 16:48:24 +0100 |
---|---|---|
committer | RJ garcia <rj@bighead.net> | 2013-03-21 16:48:24 +0100 |
commit | 395e2df7ff74fe9bf4c669dea3f6ae5eb46b081e (patch) | |
tree | 20f4c3522025caf9269e858dc1ea7b0a06cca0f2 /system | |
parent | 00ffa302db71c50bd754bebe932e1cc3b65223a3 (diff) |
Making a performance modification to DB_driver list_fields()
Signed-off-by: RJ garcia <rj@bighead.net>
Diffstat (limited to 'system')
-rw-r--r-- | system/database/DB_driver.php | 9 |
1 files changed, 2 insertions, 7 deletions
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); } } |