diff options
author | Andrey Andreev <narf@devilix.net> | 2014-03-10 09:29:43 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2014-03-10 09:29:43 +0100 |
commit | c5a0af287d3aba7ba4186406ca750bb2f986f947 (patch) | |
tree | 6d93d41c4d49469596e3d29e0f63cedebc1b20e8 /system | |
parent | 4b90a3746e929f6bbf2b83c71948665c0c31d1fe (diff) |
Fix #2928
Diffstat (limited to 'system')
-rw-r--r-- | system/database/DB_forge.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php index 4eeb74a9c..bcf7a8d71 100644 --- a/system/database/DB_forge.php +++ b/system/database/DB_forge.php @@ -806,10 +806,13 @@ abstract class CI_DB_forge { case 'ENUM': case 'SET': $attributes['CONSTRAINT'] = $this->db->escape($attributes['CONSTRAINT']); + $field['length'] = is_array($attributes['CONSTRAINT']) + ? "('".implode("','", $attributes['CONSTRAINT'])."')" + : '('.$attributes['CONSTRAINT'].')'; default: $field['length'] = is_array($attributes['CONSTRAINT']) - ? "('".implode("','", $attributes['CONSTRAINT'])."')" - : '('.$attributes['CONSTRAINT'].')'; + ? '('.implode(',', $attributes['CONSTRAINT']).')' + : '('.$attributes['CONSTRAINT'].')'; break; } } |