File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 33 "description" : " Collections library for php language" ,
44 "minimum-stability" : " dev" ,
55 "license" : " MIT" ,
6- "version" : " 1.1.2 " ,
6+ "version" : " 1.1.3 " ,
77 "authors" : [
88 {
99 "name" : " Maxim Sokolovsky" ,
Original file line number Diff line number Diff line change @@ -101,13 +101,16 @@ public static function empty(): Collection
101101
102102 private static function isStatePatternIterator (iterable $ iterable ): bool
103103 {
104+ if (!is_object ($ iterable )) {
105+ return false ;
106+ }
104107 $ i = 2 ;
105108 $ lastItem = null ;
106109 foreach ($ iterable as $ item ) {
107110 if ($ i === 0 ) {
108111 break ;
109112 }
110- if (is_object ($ item ) && $ item === $ lastItem ) {
113+ if (is_object ($ item ) && $ item === $ lastItem && method_exists ( $ item , ' rewind ' ) ) {
111114 return true ;
112115 }
113116 $ lastItem = $ item ;
You can’t perform that action at this time.
0 commit comments