adding an extra check to only type cast if its a int/true/false so you can still use fields etc in the queries

This commit is contained in:
dogmatic69 2012-03-23 22:49:45 +00:00 committed by mark_story
parent a5685947b9
commit 7c697eb9be

View file

@ -1836,7 +1836,7 @@ class DboSource extends DataSource {
if ($quoteValues) {
$update .= $this->value($value, $model->getColumnType($field));
} elseif ($model->getColumnType($field) == 'boolean') {
} elseif ($model->getColumnType($field) == 'boolean' && (is_int($value) || is_bool($value))) {
$update .= $this->boolean($value, true);
} elseif (!$alias) {
$update .= str_replace($quotedAlias . '.', '', str_replace(