diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 0da042b6f0..f8090e2acb 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -4,6 +4,7 @@ Yii Framework 2 Change Log 2.0.16 under development ------------------------ +- Bug #16966: Fix ArrayExpression support in related tables (GHopperMSK) - Bug #16028: Fix serialization of complex cache keys that contain non-UTF sequences (rugabarbo) - Bug #16945: Fixed RBAC DbManager ruleName fetching on the case of PDO::ATTR_ORACLE_NULLS => PDO::NULL_TO_STRING (razonyang) - Bug #16081: Fixed composite IN using just one column (rugabarbo) diff --git a/framework/db/ActiveRelationTrait.php b/framework/db/ActiveRelationTrait.php index 2f94af2f79..27f07defc5 100644 --- a/framework/db/ActiveRelationTrait.php +++ b/framework/db/ActiveRelationTrait.php @@ -525,6 +525,8 @@ trait ActiveRelationTrait if (($value = $model[$attribute]) !== null) { if (is_array($value)) { $values = array_merge($values, $value); + } elseif(($value instanceof ArrayExpression) && ($value->getDimension() === 1)) { + $values = array_merge($values, $value->getValue()); } else { $values[] = $value; }