summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mysqli/mysqli_utility.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_utility.php
parent4131d42c793c3db50b6184e5084332d5415c91cb (diff)
Fix #5276
Diffstat (limited to 'system/database/drivers/mysqli/mysqli_utility.php')
-rw-r--r--system/database/drivers/mysqli/mysqli_utility.php6
1 files changed, 1 insertions, 5 deletions
diff --git a/system/database/drivers/mysqli/mysqli_utility.php b/system/database/drivers/mysqli/mysqli_utility.php
index 1699b611f..82cf5cebf 100644
--- a/system/database/drivers/mysqli/mysqli_utility.php
+++ b/system/database/drivers/mysqli/mysqli_utility.php
@@ -155,11 +155,7 @@ class CI_DB_mysqli_utility extends CI_DB_utility {
while ($field = $query->result_id->fetch_field())
{
// Most versions of MySQL store timestamp as a string
- $is_int[$i] = ($field->type & MYSQLI_TYPE_TINY)
- OR ($field->type & MYSQLI_TYPE_SHORT)
- OR ($field->type & MYSQLI_TYPE_INT24)
- OR ($field->type & MYSQLI_TYPE_LONG)
- OR ($field->type & MYSQLI_TYPE_LONGLONG);
+ $is_int[$i] = in_array($field->type, array(MYSQLI_TYPE_TINY, MYSQLI_TYPE_SHORT, MYSQLI_TYPE_INT24, MYSQLI_TYPE_LONG), TRUE);
// Create a string of field names
$field_str .= $this->db->escape_identifiers($field->name).', ';