Commit c859befa by Qiang Xue

Merge branch 'master' of git://github.com/yiisoft/yii2

parents 04bf51b0 73a15c2b
......@@ -72,7 +72,13 @@ class <?= $searchModelClass ?> extends Model
protected function addCondition($query, $attribute, $partialMatch = false)
{
$value = $this->$attribute;
if (($pos = strrpos($attribute, '.')) !== false) {
$modelAttribute = substr($attribute, $pos + 1);
} else {
$modelAttribute = $attribute;
}
$value = $this->$modelAttribute;
if (trim($value) === '') {
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment