mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-05 15:04:38 +01:00
Fixed batchInsert casting of double values according to locale (#14448)
fixes #6526
This commit is contained in:
@@ -305,6 +305,9 @@ class QueryBuilder extends \yii\db\QueryBuilder
|
||||
}
|
||||
if (is_string($value)) {
|
||||
$value = $schema->quoteValue($value);
|
||||
} elseif (is_float($value)) {
|
||||
// ensure type cast always has . as decimal separator in all locales
|
||||
$value = str_replace(',', '.', (string) $value);
|
||||
} elseif ($value === true) {
|
||||
$value = 'TRUE';
|
||||
} elseif ($value === false) {
|
||||
|
||||
Reference in New Issue
Block a user