From 7c697eb9be1f9bf8352e40c3e307dc1b19d2fa16 Mon Sep 17 00:00:00 2001 From: dogmatic69 Date: Fri, 23 Mar 2012 22:49:45 +0000 Subject: [PATCH] adding an extra check to only type cast if its a int/true/false so you can still use fields etc in the queries --- lib/Cake/Model/Datasource/DboSource.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Model/Datasource/DboSource.php b/lib/Cake/Model/Datasource/DboSource.php index 7893d7413..d6eef1632 100644 --- a/lib/Cake/Model/Datasource/DboSource.php +++ b/lib/Cake/Model/Datasource/DboSource.php @@ -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(