Browse files

PDO was not escaping strings for SET as array

  • Loading branch information...
1 parent eae17d1 commit a00f90c2973111f0d95ac129eba967e8269ea0d6 Phil Sturgeon committed Nov 18, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 system/database/DB_forge.php
View
2 system/database/DB_forge.php
@@ -762,7 +762,7 @@ protected function _process_fields($create_table = FALSE)
$attributes['CONSTRAINT'] = $this->db->escape($attributes['CONSTRAINT']);
default:
$field['length'] = is_array($attributes['CONSTRAINT'])
- ? '('.implode(',', $attributes['CONSTRAINT']).')'
+ ? '("'.implode('","', $attributes['CONSTRAINT']).'")'
: '('.$attributes['CONSTRAINT'].')';
break;
}

0 comments on commit a00f90c

Please sign in to comment.