summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mysqli/mysqli_result.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/drivers/mysqli/mysqli_result.php')
-rw-r--r--system/database/drivers/mysqli/mysqli_result.php18
1 files changed, 5 insertions, 13 deletions
diff --git a/system/database/drivers/mysqli/mysqli_result.php b/system/database/drivers/mysqli/mysqli_result.php
index 0b3d9c2b4..bac073781 100644
--- a/system/database/drivers/mysqli/mysqli_result.php
+++ b/system/database/drivers/mysqli/mysqli_result.php
@@ -6,7 +6,7 @@
*
* This content is released under the MIT License (MIT)
*
- * Copyright (c) 2014 - 2017, British Columbia Institute of Technology
+ * Copyright (c) 2014 - 2018, British Columbia Institute of Technology
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +29,7 @@
* @package CodeIgniter
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
- * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/)
+ * @copyright Copyright (c) 2014 - 2018, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://opensource.org/licenses/MIT MIT License
* @link https://codeigniter.com
* @since Version 1.3.0
@@ -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;
}
// --------------------------------------------------------------------