mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-03 05:48:11 +08:00
Fixed encoding of empty ArrayExpression for PostgreSQL
This commit is contained in:
@ -9,6 +9,7 @@ Yii Framework 2 Change Log
|
||||
- Bug #15822: Fixed `yii\base\Component::off()` not to throw an exception when handler does not exist (silverfire)
|
||||
- Bug #15817: Fixed support of deprecated array format type casting in `yii\db\Command::bindValues()` (silverfire)
|
||||
- Bug #15804: Fixed `null` values handling for PostgresSQL arrays (silverfire)
|
||||
- Bug: Fixed encoding of empty `yii\db\ArrayExpression` for PostgreSQL (silverfire)
|
||||
|
||||
|
||||
2.0.14.1 February 24, 2018
|
||||
|
||||
@ -42,9 +42,6 @@ class ArrayExpressionBuilder implements ExpressionBuilderInterface
|
||||
}
|
||||
|
||||
$placeholders = $this->buildPlaceholders($expression, $params);
|
||||
if (empty($placeholders)) {
|
||||
return "'{}'";
|
||||
}
|
||||
|
||||
return 'ARRAY[' . implode(', ', $placeholders) . ']' . $this->getTypehint($expression);
|
||||
}
|
||||
|
||||
@ -102,8 +102,6 @@ class ArrayParser
|
||||
|
||||
if (!$isQuoted && $result === 'NULL') {
|
||||
$result = null;
|
||||
} elseif ($isQuoted && $result === '{}') {
|
||||
$result = [];
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
Reference in New Issue
Block a user