Fixed batchInsert casting of double values according to locale (#14448)

fixes #6526
This commit is contained in:
Carsten Brandt
2017-08-13 22:15:04 +02:00
committed by GitHub
parent 03299e8870
commit cda3089623
6 changed files with 68 additions and 0 deletions

View File

@ -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) {