summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
=============