summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-11-16 14:44:24 +0100
committerAndrey Andreev <narf@devilix.net>2015-11-16 14:44:24 +0100
commit9e2c7b9dd7e87a94c5a3696bc326cbbec5da7bb8 (patch)
treeb98044e90665d81c28d670c51a6f1fd67b3237dd
parentb06b5c46ef59534cb3d0eb7e9b95c0c5720ee5e5 (diff)
[ci skip] Fix #4245
-rw-r--r--system/database/DB_forge.php2
-rw-r--r--user_guide_src/source/changelog.rst1
2 files changed, 2 insertions, 1 deletions
diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php
index f9cf76a14..d2302b2f2 100644
--- a/system/database/DB_forge.php
+++ b/system/database/DB_forge.php
@@ -781,7 +781,7 @@ abstract class CI_DB_forge {
case 'SET':
$attributes['CONSTRAINT'] = $this->db->escape($attributes['CONSTRAINT']);
$field['length'] = is_array($attributes['CONSTRAINT'])
- ? "('".implode("','", $attributes['CONSTRAINT'])."')"
+ ? "(".implode(",", $attributes['CONSTRAINT']).")"
: '('.$attributes['CONSTRAINT'].')';
break;
default:
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 1d111b161..b0c4055b5 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -16,6 +16,7 @@ Bug fixes for 3.0.4
- Fixed a bug where :doc:`CAPTCHA Helper <helpers/captcha_helper>` entered an infinite loop while generating a random string.
- Fixed a bug (#4223) - :doc:`Database <database/method>` method ``simple_query()`` blindly executes queries without checking if the connection was initialized properly.
- Fixed a bug (#4244) - :doc:`Email Library <libraries/email>` could improperly use "unsafe" US-ASCII characters during Quoted-printable encoding.
+- Fixed a bug (#4245) - :doc:`Database Forge <database/forge>` couldn't properly handle ``SET`` and ``ENUM`` type fields with string values.
Version 3.0.3
=============