mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Enum now escapes field values (fixes #6437, thanks simon_w)
This commit is contained in:
parent
f94be66cb2
commit
7ebe602482
@ -53,7 +53,7 @@ class Enum extends DBField {
|
||||
}
|
||||
|
||||
function requireField(){
|
||||
$parts=Array('datatype'=>'enum', 'enums'=>$this->enum, 'character set'=>'utf8', 'collate'=> 'utf8_general_ci', 'default'=>$this->default, 'table'=>$this->tableName, 'arrayValue'=>$this->arrayValue);
|
||||
$parts=Array('datatype'=>'enum', 'enums'=>Convert::raw2sql($this->enum), 'character set'=>'utf8', 'collate'=> 'utf8_general_ci', 'default'=>Convert::raw2sql($this->default), 'table'=>$this->tableName, 'arrayValue'=>$this->arrayValue);
|
||||
$values=Array('type'=>'enum', 'parts'=>$parts);
|
||||
DB::requireField($this->tableName, $this->name, $values);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user