Browse Source

A different fix for #7649

Jose Lorenzo Rodriguez 10 years ago
parent
commit
a5a22bd7a3
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/Collection/CollectionTrait.php

+ 4 - 1
src/Collection/CollectionTrait.php

@@ -607,7 +607,10 @@ trait CollectionTrait
      */
     public function isEmpty()
     {
-        return iterator_count($this->unwrap()) === 0;
+        foreach ($this->unwrap() as $el) {
+            return false;
+        }
+        return true;
     }
 
     /**