summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mysqli/mysqli_result.php
diff options
context:
space:
mode:
authorRepox <storm@err0r.dk>2011-11-23 09:44:54 +0100
committerRepox <storm@err0r.dk>2011-11-23 09:44:54 +0100
commite45f28c5ab7509ade2a9db0cd574d8a688bc4c3b (patch)
tree81a8720574945f47edb0617842c331c6e1f476a1 /system/database/drivers/mysqli/mysqli_result.php
parent1f9a40f2465ee135d4ed0292d51a1ed6571173f0 (diff)
parentb25bf9db4af963269362e16cec0a99326c4439ad (diff)
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into develop
Diffstat (limited to 'system/database/drivers/mysqli/mysqli_result.php')
-rw-r--r--system/database/drivers/mysqli/mysqli_result.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/system/database/drivers/mysqli/mysqli_result.php b/system/database/drivers/mysqli/mysqli_result.php
index bfe500e19..163788b6c 100644
--- a/system/database/drivers/mysqli/mysqli_result.php
+++ b/system/database/drivers/mysqli/mysqli_result.php
@@ -98,10 +98,10 @@ class CI_DB_mysqli_result extends CI_DB_result {
$retval = array();
while ($field = mysqli_fetch_object($this->result_id))
{
- preg_match('/([a-zA-Z]+)(\((\d+)\))?/i', $field->Type, $matches);
+ preg_match('/([a-zA-Z]+)(\(\d+\))?/', $field->Type, $matches);
- $type = $matches[1];
- $length = isset($matches[3]) ? (int) $matches[3] : NULL;
+ $type = (array_key_exists(1, $matches)) ? $matches[1] : NULL;
+ $length = (array_key_exists(2, $matches)) ? preg_replace('/[^\d]/', '', $matches[2]) : NULL;
$F = new stdClass();
$F->name = $field->Field;