Browse Source

Make sure that we have arrays inside the for loop checking for multiple dimensions

Alexandros Solanos 9 years ago
parent
commit
c31e783ef8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Collection/CollectionTrait.php

+ 1 - 1
src/Collection/CollectionTrait.php

@@ -696,7 +696,7 @@ trait CollectionTrait
         $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');
             }