Skip to content

Commit 278bfca

Browse files
edgardmessiascebe
authored andcommitted
Fixed quoteColumnName for table start with {{ or [[
1 parent 38d347c commit 278bfca

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

framework/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Yii Framework 2 Change Log
140140
- Bug #10751: Fixed `yii\validators\UrlValidator` pattern to improve matching (silverfire)
141141
- Bug #10760: `yii\widgets\DetailView::normalizeAttributes()` fixed for arrayable models (boehsermoe)
142142
- Bug #10825: Fixed `yii\validators\EachValidator` does not respect `skipOnEmpty` rule parameter (klimov-paul)
143-
- Bug #11088: Fixed bug with column name not being quoted correctly, when a quoted table name or a table name in prefix syntax was used (cebe, Ni-san)
143+
- Bug #11088: Fixed bug with column name not being quoted correctly, when a quoted table name or a table name in prefix syntax was used (cebe, edgardmessias, Ni-san)
144144
- Bug: Fixed generation of canonical URLs for `ViewAction` pages (samdark)
145145
- Bug: Fixed `mb_*` functions calls to use `UTF-8` or `Yii::$app->charset` (silverfire)
146146
- Enh #2377: Allow specifying a table alias when joining relations via `joinWith()` (cebe, nainoon)

tests/framework/db/ConnectionTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ public function testQuoteFullColumnName()
103103
$this->assertEquals('[[table.column]]', $connection->quoteColumnName('[[table.column]]'));
104104
$this->assertEquals('{{table}}.`column`', $connection->quoteColumnName('{{table}}.column'));
105105
$this->assertEquals('{{table}}.`column`', $connection->quoteColumnName('{{table}}.`column`'));
106+
$this->assertEquals('{{table}}.[[column]]', $connection->quoteColumnName('{{table}}.[[column]]'));
106107
$this->assertEquals('{{%table}}.`column`', $connection->quoteColumnName('{{%table}}.column'));
107108
$this->assertEquals('{{%table}}.`column`', $connection->quoteColumnName('{{%table}}.`column`'));
108109

0 commit comments

Comments
 (0)