Skip to content

Commit

Permalink
Make sure that we have arrays inside the for loop checking for multip…
Browse files Browse the repository at this point in the history
…le dimensions
  • Loading branch information
hytromo committed Sep 6, 2016
1 parent c49ddd0 commit c31e783
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Collection/CollectionTrait.php
Expand Up @@ -696,7 +696,7 @@ public function cartesianProduct(callable $operation = null, callable $filter =
$collectionArraysKeys = [];
$collectionArraysCounts = [];

foreach ($this as $value) {
foreach ($this->toList() as $value) {
if (count($value) !== count($value, COUNT_RECURSIVE)) {
throw new LogicException('Cannot find the cartesian product of a multidimensional array');
}
Expand Down

0 comments on commit c31e783

Please sign in to comment.