We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 455ca54 commit e5b3bb3Copy full SHA for e5b3bb3
app/code/Magento/Catalog/Block/Product/ListProduct.php
@@ -458,7 +458,7 @@ private function initializeProductCollection()
458
// if the product is associated with any category
459
if ($categories->count()) {
460
// show products from this category
461
- $this->setCategoryId(current($categories->getIterator())->getId());
+ $this->setCategoryId($categories->getIterator()->current()->getId());
462
}
463
464
0 commit comments