File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
app/code/Magento/CatalogImportExport Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1008,6 +1008,9 @@ public function export()
1008
1008
$ this ->paginateCollection ($ page , $ this ->getItemsPerPage ());
1009
1009
1010
1010
$ exportData = $ this ->getExportData ();
1011
+ if (count ($ exportData ) == 0 ) {
1012
+ break ;
1013
+ }
1011
1014
if ($ page == 1 ) {
1012
1015
$ writer ->setHeaderCols ($ this ->_getHeaderColumns ());
1013
1016
}
Original file line number Diff line number Diff line change @@ -373,8 +373,6 @@ public function testExportCurPageEqualToLastBreakInternalCalls()
373
373
$ this ->product ->expects ($ this ->once ())->method ('paginateCollection ' )->with ($ page , $ itemsPerPage );
374
374
$ this ->abstractCollection ->expects ($ this ->once ())->method ('setOrder ' )->with ('entity_id ' , 'asc ' );
375
375
376
- $ this ->abstractCollection ->expects ($ this ->once ())->method ('count ' )->willReturn (1 );
377
-
378
376
$ this ->abstractCollection ->expects ($ this ->once ())->method ('getCurPage ' )->willReturn ($ curPage );
379
377
$ this ->abstractCollection ->expects ($ this ->once ())->method ('getLastPageNumber ' )->willReturn ($ lastPage );
380
378
$ headers = ['headers ' ];
You can’t perform that action at this time.
0 commit comments