Making a performance modification to DB_driver list_fields()
Signed-off-by: RJ garcia <rj@bighead.net>
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 18dbbc7..04490c8 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -1208,13 +1208,8 @@
}
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);
}
}