Skip to content

Commit 4a46f67

Browse files
committed
Merge branch 'master' into fix-type-boolean-mysql
2 parents f0628df + 7005d27 commit 4a46f67

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

framework/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Yii Framework 2 Change Log
1111
- Bug #20002: Fixed superfluous query on HEAD request in serializer (xicond)
1212
- Enh #12743: Added new methods `BaseActiveRecord::loadRelations()` and `BaseActiveRecord::loadRelationsFor()` to eager load related models for existing primary model instances (PowerGamer1)
1313
- Enh #20030: Improve performance of handling `ErrorHandler::$memoryReserveSize` (antonshevelev, rob006)
14+
- Enh #20042: Add empty array check to `ActiveQueryTrait::findWith()` (renkas)
1415
- Enh #20032: Added `mask` method for string masking with multibyte support (salehhashemi1992)
1516

1617

framework/db/ActiveQueryTrait.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ protected function createModels($rows)
135135
*/
136136
public function findWith($with, &$models)
137137
{
138+
if (empty($models)) {
139+
return;
140+
}
141+
138142
$primaryModel = reset($models);
139143
if (!$primaryModel instanceof ActiveRecordInterface) {
140144
/* @var $modelClass ActiveRecordInterface */

0 commit comments

Comments
 (0)