mirror of
https://github.com/yiisoft/yii2.git
synced 2025-10-30 01:56:35 +08:00
Merge branch 'master' into fix-type-boolean-mysql
This commit is contained in:
@ -11,6 +11,7 @@ Yii Framework 2 Change Log
|
||||
- Bug #20002: Fixed superfluous query on HEAD request in serializer (xicond)
|
||||
- Enh #12743: Added new methods `BaseActiveRecord::loadRelations()` and `BaseActiveRecord::loadRelationsFor()` to eager load related models for existing primary model instances (PowerGamer1)
|
||||
- Enh #20030: Improve performance of handling `ErrorHandler::$memoryReserveSize` (antonshevelev, rob006)
|
||||
- Enh #20042: Add empty array check to `ActiveQueryTrait::findWith()` (renkas)
|
||||
- Enh #20032: Added `mask` method for string masking with multibyte support (salehhashemi1992)
|
||||
|
||||
|
||||
|
||||
@ -135,6 +135,10 @@ trait ActiveQueryTrait
|
||||
*/
|
||||
public function findWith($with, &$models)
|
||||
{
|
||||
if (empty($models)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$primaryModel = reset($models);
|
||||
if (!$primaryModel instanceof ActiveRecordInterface) {
|
||||
/* @var $modelClass ActiveRecordInterface */
|
||||
|
||||
Reference in New Issue
Block a user