Commit c2a3aa3d by Qiang Xue

Fixes #885: removed NULLs from filtering by models.

parent bb6d0f1b
...@@ -279,7 +279,9 @@ class ActiveRelation extends ActiveQuery ...@@ -279,7 +279,9 @@ class ActiveRelation extends ActiveQuery
// single key // single key
$attribute = reset($this->link); $attribute = reset($this->link);
foreach ($models as $model) { foreach ($models as $model) {
$values[] = $model[$attribute]; if (($value = $model[$attribute]) !== null) {
$values[] = $value;
}
} }
} else { } else {
// composite keys // composite keys
......
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