Skip to content

Commit ed21fb6

Browse files
author
Oleksandr Iegorov
committed
MC-42811: Missing Bundled Products on Category Pages
1 parent 00fc7a2 commit ed21fb6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/code/Magento/Elasticsearch/Model/Indexer/IndexerHandler.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,11 @@ private function updateCacheContext(array $docs) : void
145145
{
146146
$categoryIds = [];
147147
foreach ($docs as $document) {
148-
array_push($categoryIds, ...$document['category_ids']);
148+
if (is_array($document['category_ids'])) {
149+
array_push($categoryIds, ...$document['category_ids']);
150+
} elseif (!empty($document['category_ids'])) {
151+
array_push($categoryIds, $document['category_ids']);
152+
}
149153
}
150154
if (!empty($categoryIds)) {
151155
$categoryIds = array_unique($categoryIds);

0 commit comments

Comments
 (0)