mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 21:41:19 +08:00
Fix #17473: Fixed SimpleConditionBuilder::build() when column is not a string
This commit is contained in:
committed by
Alexander Makarov
parent
e615f0f43e
commit
69cf9de56b
@ -4,6 +4,7 @@ Yii Framework 2 Change Log
|
||||
2.0.25 under development
|
||||
------------------------
|
||||
|
||||
- Bug #17473: Fixed `SimpleConditionBuilder::build()` when column is not a string (alexkart)
|
||||
- Bug #17486: Fixed error when using `batch()` without `$db` parameter with MSSQL (alexkart)
|
||||
|
||||
|
||||
|
||||
@ -10,7 +10,6 @@ namespace yii\db\conditions;
|
||||
use yii\db\ExpressionBuilderInterface;
|
||||
use yii\db\ExpressionBuilderTrait;
|
||||
use yii\db\ExpressionInterface;
|
||||
use yii\db\Query;
|
||||
|
||||
/**
|
||||
* Class NotConditionBuilder builds objects of [[SimpleCondition]]
|
||||
@ -37,7 +36,7 @@ class SimpleConditionBuilder implements ExpressionBuilderInterface
|
||||
$column = $expression->getColumn();
|
||||
$value = $expression->getValue();
|
||||
|
||||
if (strpos($column, '(') === false) {
|
||||
if (is_string($column) && strpos($column, '(') === false) {
|
||||
$column = $this->queryBuilder->db->quoteColumnName($column);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user