Skip to content
Browse files

If no DEFAULT value is set in CUBRID, the driver returns an empty str…

…ing. To return the same result as MySQL, CUBRID Driver for CI also returns NULL.
  • Loading branch information...
1 parent 31dda35 commit f1c156d670d3cf24d3ae75e8aee876a66ec2bd9e @kadishmal kadishmal committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 system/database/drivers/cubrid/cubrid_result.php
View
2 system/database/drivers/cubrid/cubrid_result.php
@@ -93,7 +93,7 @@ public function field_data()
// CUBRID returns type as varchar(100) for example,
// that's why we need to remove all brackets and digits.
$F->type = preg_replace('/[\d()]/', '', $field->type);
- $F->default = $field->def;
+ $F->default = $field->def == '' ? NULL : $field->def;
// use CUBRID's native API to obtain column's max_length,
// otherwise $field->max_length returns incorrect info.
// See #150.

0 comments on commit f1c156d

Please sign in to comment.
Something went wrong with that request. Please try again.