summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mysqli/mysqli_result.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2017-09-27 17:57:46 +0200
committerAndrey Andreev <narf@devilix.net>2017-09-27 17:57:46 +0200
commita9194650e6ae387be29aacfdf4b1b27a5c60ca34 (patch)
tree181c656640a53437f177425b6d0cc6b243b01a03 /system/database/drivers/mysqli/mysqli_result.php
parent4131d42c793c3db50b6184e5084332d5415c91cb (diff)
Fix #5276
Diffstat (limited to 'system/database/drivers/mysqli/mysqli_result.php')
-rw-r--r--system/database/drivers/mysqli/mysqli_result.php14
1 files changed, 3 insertions, 11 deletions
diff --git a/system/database/drivers/mysqli/mysqli_result.php b/system/database/drivers/mysqli/mysqli_result.php
index 0b3d9c2b4..bd465c405 100644
--- a/system/database/drivers/mysqli/mysqli_result.php
+++ b/system/database/drivers/mysqli/mysqli_result.php
@@ -130,10 +130,10 @@ class CI_DB_mysqli_result extends CI_DB_result {
* mysqli_result::fetch_fields()
*
* @used-by CI_DB_mysqli_result::field_data()
- * @param int $flags
+ * @param int $type
* @return string
*/
- private static function _get_field_type($flags)
+ private static function _get_field_type($type)
{
static $map;
isset($map) OR $map = array(
@@ -164,15 +164,7 @@ class CI_DB_mysqli_result extends CI_DB_result {
MYSQLI_TYPE_GEOMETRY => 'geometry'
);
- foreach ($map as $flag => $name)
- {
- if ($flags & $flag)
- {
- return $name;
- }
- }
-
- return $flags;
+ return isset($map[$type]) ? $map[$type] : $type;
}
// --------------------------------------------------------------------