Fix #5276
diff --git a/system/database/drivers/mysqli/mysqli_result.php b/system/database/drivers/mysqli/mysqli_result.php
index 0b3d9c2..bd465c4 100644
--- a/system/database/drivers/mysqli/mysqli_result.php
+++ b/system/database/drivers/mysqli/mysqli_result.php
@@ -130,10 +130,10 @@
 	 * 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 @@
 			MYSQLI_TYPE_GEOMETRY    => 'geometry'
 		);
 
-		foreach ($map as $flag => $name)
-		{
-			if ($flags & $flag)
-			{
-				return $name;
-			}
-		}
-
-		return $flags;
+		return isset($map[$type]) ? $map[$type] : $type;
 	}
 
 	// --------------------------------------------------------------------