Skip to content

Commit 50bf786

Browse files
committed
MC-22852: 24/36 product limit on Category page occur fatal
1 parent 629028c commit 50bf786

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/code/Magento/Elasticsearch/Model/ResourceModel/Fulltext/Collection/SearchResultApplier.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ public function apply()
8686
private function sliceItems(array $items, int $size, int $currentPage): array
8787
{
8888
if ($size !== 0) {
89-
// define max allowed pages based on items count and visible items per page calculates offset of visible
90-
// items for given page.
89+
// Check that current page is in a range of allowed page numbers, based on items count and items per page,
90+
// than calculate offset for slicing items array.
9191
$itemsCount = count($items);
9292
$maxAllowedPageNumber = ceil($itemsCount/$size);
9393
if ($currentPage < 1) {

0 commit comments

Comments
 (0)