Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mahagr committed Sep 26, 2017
1 parent 0fd6fda commit a535e85
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ public function collectionGroup($property)
foreach ($this->group($property) as $id => $elements) {
// TODO: remove when PHP 5.6 is minimum (with doctrine/collections v1.4).
if (!method_exists($this, 'createFrom')) {
$collection = new static(array_reverse($this->toArray()));
$collection = new static($elements);
} else {
$collection = $this->createFrom(array_reverse($this->toArray()));
$collection = $this->createFrom($elements);
}

$collections[$id] = $collection;
Expand Down

0 comments on commit a535e85

Please sign in to comment.