Skip to content

Commit

Permalink
The method allPopulate in ActiveQuery will execute populate twice dur…
Browse files Browse the repository at this point in the history
…ing execution
  • Loading branch information
niqingyang committed Jan 6, 2024
1 parent 65d7afe commit f95a71d
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/ActiveQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,13 +349,7 @@ private function removeDuplicatedModels(array $models): array
*/
public function allPopulate(): array
{
$rows = $this->all();

if ($rows !== []) {
$rows = $this->populate($rows, $this->indexBy);
}

return $rows;
return $this->all();
}

/**
Expand Down

0 comments on commit f95a71d

Please sign in to comment.