Skip to content

Commit 629028c

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

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +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.
8991
$itemsCount = count($items);
9092
$maxAllowedPageNumber = ceil($itemsCount/$size);
9193
if ($currentPage < 1) {

0 commit comments

Comments
 (0)