mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
Fixed batchInsert casting of double values according to locale (#14448)
fixes #6526
This commit is contained in:
@ -101,6 +101,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 === false) {
|
||||
$value = 0;
|
||||
} elseif ($value === null) {
|
||||
|
Reference in New Issue
Block a user