Skip to content

Commit

Permalink
Minor refactoring of BaseActiveRecord::populateRelation() (#16161)
Browse files Browse the repository at this point in the history
  • Loading branch information
243083df authored and samdark committed Apr 26, 2018
1 parent b9e345b commit 56a3d21
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions framework/db/BaseActiveRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -458,10 +458,8 @@ protected function createRelationQuery($class, $link, $multiple)
*/
public function populateRelation($name, $records)
{
foreach ($this->_relationsDependencies as $attribute => $relationNames) {
if (isset($relationNames[$name])) {
unset($this->_relationsDependencies[$attribute][$name]);
}
foreach ($this->_relationsDependencies as &$relationNames) {
unset($relationNames[$name]);
}

$this->_related[$name] = $records;
Expand Down

0 comments on commit 56a3d21

Please sign in to comment.