mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-23 04:00:23 +08:00
ActiveRelationTrait::getModelKey() updated to work with non scalar keys.
This commit is contained in:
@ -203,7 +203,8 @@ trait ActiveRelationTrait
|
||||
return serialize($key);
|
||||
} else {
|
||||
$attribute = reset($attributes);
|
||||
return $model[$attribute];
|
||||
$key = $model[$attribute];
|
||||
return is_scalar($key) ? $key : serialize($key);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user