We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0af1c05 commit b195d9eCopy full SHA for b195d9e
framework/db/ActiveRecord.php
@@ -209,8 +209,9 @@ protected static function filterCondition(array $condition)
209
$result = [];
210
// valid column names are table column names or column names prefixed with table name
211
$columnNames = static::getTableSchema()->getColumnNames();
212
- $columnNames = array_merge($columnNames, array_map(function($columnName) {
213
- return static::tableName() . ".$columnName";
+ $tableName = static::tableName();
+ $columnNames = array_merge($columnNames, array_map(function($columnName) use ($tableName) {
214
+ return "$tableName.$columnName";
215
}, $columnNames));
216
foreach ($condition as $key => $value) {
217
if (is_string($key) && !in_array($key, $columnNames, true)) {
0 commit comments