Skip to content

Commit

Permalink
Correctly parse boolean constants (e.g. used in SQLite) in `\yii\db\C…
Browse files Browse the repository at this point in the history
…olumnSchema::typecast()`
  • Loading branch information
rhertogh committed Mar 3, 2024
1 parent 78cc719 commit 4cfcf30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion framework/db/ColumnSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ protected function typecast($value)
case 'boolean':
// treating a 0 bit value as false too
// https://github.com/yiisoft/yii2/issues/9006
return (bool) $value && $value !== "\0";
return (bool) $value && $value !== "\0" && strtolower($value) !== 'false';
case 'double':
return (float) $value;
}
Expand Down

0 comments on commit 4cfcf30

Please sign in to comment.