Skip to content

Commit dda8385

Browse files
authored
ENGCOM-7144: #26708 Fix: ORDER BY has two similar conditions in the SQL query #27263
2 parents 9c4e021 + ac524c4 commit dda8385

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

app/code/Magento/Catalog/Block/Product/ListProduct.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ public function getIdentities()
355355
}
356356

357357
foreach ($this->_getProductCollection() as $item) {
358+
// phpcs:ignore Magento2.Performance.ForeachArrayMerge
358359
$identities = array_merge($identities, $item->getIdentities());
359360
}
360361

@@ -475,8 +476,6 @@ private function initializeProductCollection()
475476
$layer->setCurrentCategory($origCategory);
476477
}
477478

478-
$this->addToolbarBlock($collection);
479-
480479
$this->_eventManager->dispatch(
481480
'catalog_block_product_list_collection',
482481
['collection' => $collection]

app/code/Magento/Catalog/Test/Unit/Block/Product/ListProductTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,6 @@ public function testGetIdentities()
187187
->method('getProductCollection')
188188
->will($this->returnValue($this->prodCollectionMock));
189189

190-
$this->layoutMock->expects($this->once())
191-
->method('getBlock')
192-
->will($this->returnValue($this->toolbarMock));
193-
194190
$this->assertEquals(
195191
[$categoryTag, $productTag],
196192
$this->block->getIdentities()

0 commit comments

Comments
 (0)