BUGFIX: Enum now escapes field values (fixes #6437, thanks simon_w)

This commit is contained in:
Julian Seidenberg 2011-03-22 11:29:33 +13:00 committed by Ingo Schommer
parent f94be66cb2
commit 7ebe602482

View File

@ -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);
}