mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
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:
parent
a5685947b9
commit
7c697eb9be
1 changed files with 1 additions and 1 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue