From 4cfcf30b3729870d243819eb2369b455093c51dc Mon Sep 17 00:00:00 2001 From: Rutger Hertogh Date: Sun, 3 Mar 2024 02:56:40 +0100 Subject: [PATCH] Correctly parse boolean constants (e.g. used in SQLite) in `\yii\db\ColumnSchema::typecast()` --- framework/db/ColumnSchema.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/db/ColumnSchema.php b/framework/db/ColumnSchema.php index 74e1ddea84b..1d01cec2707 100644 --- a/framework/db/ColumnSchema.php +++ b/framework/db/ColumnSchema.php @@ -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; }