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(
113
113
public function current ()
114
114
{
115
115
if (null === $ this ->currentSelect ) {
116
- $ this ->isValid = ( $ this ->currentOffset + $ this -> batchSize ) <= $ this ->totalItemCount ;
116
+ $ this ->isValid = $ this ->currentOffset < $ this ->totalItemCount ;
117
117
$ this ->currentSelect = $ this ->initSelectObject ();
118
118
}
119
119
return $ this ->currentSelect ;
@@ -144,7 +144,7 @@ public function next()
144
144
if (null === $ this ->currentSelect ) {
145
145
$ this ->current ();
146
146
}
147
- $ this ->isValid = ( $ this ->batchSize + $ this -> currentOffset ) <= $ this ->totalItemCount ;
147
+ $ this ->isValid = $ this ->currentOffset < $ this ->totalItemCount ;
148
148
$ select = $ this ->initSelectObject ();
149
149
if ($ this ->isValid ) {
150
150
$ this ->iteration ++;
Original file line number Diff line number Diff line change @@ -116,6 +116,6 @@ public function testIterations()
116
116
$ iterations ++;
117
117
}
118
118
119
- $ this ->assertEquals (10 , $ iterations );
119
+ $ this ->assertEquals (11 , $ iterations );
120
120
}
121
121
}
You can’t perform that action at this time.
0 commit comments