File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
lib/internal/Magento/Framework Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ public function __construct(
113113 public function current ()
114114 {
115115 if (null === $ this ->currentSelect ) {
116- $ this ->isValid = ( $ this ->currentOffset + $ this -> batchSize ) <= $ this ->totalItemCount ;
116+ $ this ->isValid = $ this ->currentOffset < $ this ->totalItemCount ;
117117 $ this ->currentSelect = $ this ->initSelectObject ();
118118 }
119119 return $ this ->currentSelect ;
@@ -144,7 +144,7 @@ public function next()
144144 if (null === $ this ->currentSelect ) {
145145 $ this ->current ();
146146 }
147- $ this ->isValid = ( $ this ->batchSize + $ this -> currentOffset ) <= $ this ->totalItemCount ;
147+ $ this ->isValid = $ this ->currentOffset < $ this ->totalItemCount ;
148148 $ select = $ this ->initSelectObject ();
149149 if ($ this ->isValid ) {
150150 $ this ->iteration ++;
Original file line number Diff line number Diff line change @@ -116,6 +116,6 @@ public function testIterations()
116116 $ iterations ++;
117117 }
118118
119- $ this ->assertEquals (10 , $ iterations );
119+ $ this ->assertEquals (11 , $ iterations );
120120 }
121121}
You can’t perform that action at this time.
0 commit comments