diff options
author | Kyle Farris <kylefarris@kylefarris.gotdns.org> | 2011-10-14 21:43:25 +0200 |
---|---|---|
committer | Kyle Farris <kylefarris@kylefarris.gotdns.org> | 2011-10-14 21:43:25 +0200 |
commit | ad17f4b932b3728c1e299b48f28b3ae0dbdd6b0b (patch) | |
tree | fdb357433e76000bdef60c4d18e5ab0540b07aeb /system/database/drivers/mysqli/mysqli_result.php | |
parent | db46d02ac23b8e0bc2416e197494d3b795b57530 (diff) | |
parent | a2125a5d830fd390b4cf35f77e9bb0558cfa2dd7 (diff) |
Merged with development
Diffstat (limited to 'system/database/drivers/mysqli/mysqli_result.php')
-rw-r--r-- | system/database/drivers/mysqli/mysqli_result.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/system/database/drivers/mysqli/mysqli_result.php b/system/database/drivers/mysqli/mysqli_result.php index ac863056a..bbfb8481a 100644 --- a/system/database/drivers/mysqli/mysqli_result.php +++ b/system/database/drivers/mysqli/mysqli_result.php @@ -86,10 +86,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+)\)/', $field->Type, $matches); + preg_match('/([a-zA-Z]+)(\((\d+)\))?/i', $field->Type, $matches); $type = $matches[1]; - $length = (int)$matches[2]; + $length = isset($matches[3]) ? (int) $matches[3] : NULL; $F = new stdClass(); $F->name = $field->Field; |