Fixes #15122: Fixed yii\db\Command::getRawSql() to properly replace expressions

This commit is contained in:
hiscaler
2017-11-08 17:00:56 +08:00
committed by Alexander Makarov
parent acce1db53b
commit d32b80eec9
2 changed files with 2 additions and 1 deletions

View File

@ -211,7 +211,7 @@ class Command extends Component
$params[$name] = ($value ? 'TRUE' : 'FALSE');
} elseif ($value === null) {
$params[$name] = 'NULL';
} elseif (!is_object($value) && !is_resource($value)) {
} elseif ((!is_object($value) && !is_resource($value)) || $value instanceof Expression) {
$params[$name] = $value;
}
}