summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mysqli/mysqli_result.php
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-11-22 16:25:32 +0100
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-11-22 16:25:32 +0100
commitc00a5a042341b8fe10d264ed1ea70177bc5e572d (patch)
tree88be90e02c41de95868152b8f3107d03b0b53fb8 /system/database/drivers/mysqli/mysqli_result.php
parentc737c94b6dd2044b7c1a7d506c57de7da6df97f4 (diff)
parent0199f68db46d375af2d4cb831c679d3040601f25 (diff)
Merge master (2.1.0) and fixed conflicts.
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;