Skip to content

Commit

Permalink
HHVM has a bug aroudn assigning by referece I did not want to investi…
Browse files Browse the repository at this point in the history
…gate.

Instead, worked around it to make it work
  • Loading branch information
lorenzo committed Feb 6, 2015
1 parent 3807a2b commit 27a6ce9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Collection/CollectionTrait.php
Expand Up @@ -390,9 +390,11 @@ public function nest($idPath, $parentPath)
return;
}

$children = [];
foreach ($values as $id) {
$parents[$key]['children'][] =& $parents[$id];
$children[] =& $parents[$id];
}
$parents[$key]['children'] = $children;
};

$collection = new MapReduce($this, $mapper, $reducer);
Expand Down

0 comments on commit 27a6ce9

Please sign in to comment.