Fixed encoding of empty ArrayExpression for PostgreSQL

This commit is contained in:
SilverFire - Dmitry Naumenko
2018-03-03 20:43:37 +02:00
parent d5d4b8b0f5
commit 5fa25b331d
6 changed files with 8 additions and 11 deletions

View File

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

View File

@ -42,9 +42,6 @@ class ArrayExpressionBuilder implements ExpressionBuilderInterface
}
$placeholders = $this->buildPlaceholders($expression, $params);
if (empty($placeholders)) {
return "'{}'";
}
return 'ARRAY[' . implode(', ', $placeholders) . ']' . $this->getTypehint($expression);
}

View File

@ -102,8 +102,6 @@ class ArrayParser
if (!$isQuoted && $result === 'NULL') {
$result = null;
} elseif ($isQuoted && $result === '{}') {
$result = [];
}
return $result;