Skip to content

Commit

Permalink
ENGCOM-7144: #26708 Fix: ORDER BY has two similar conditions in the S…
Browse files Browse the repository at this point in the history
…QL query #27263
  • Loading branch information
slavvka authored Mar 20, 2020
2 parents 9c4e021 + ac524c4 commit dda8385
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
3 changes: 1 addition & 2 deletions app/code/Magento/Catalog/Block/Product/ListProduct.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ public function getIdentities()
}

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

Expand Down Expand Up @@ -475,8 +476,6 @@ private function initializeProductCollection()
$layer->setCurrentCategory($origCategory);
}

$this->addToolbarBlock($collection);

$this->_eventManager->dispatch(
'catalog_block_product_list_collection',
['collection' => $collection]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,6 @@ public function testGetIdentities()
->method('getProductCollection')
->will($this->returnValue($this->prodCollectionMock));

$this->layoutMock->expects($this->once())
->method('getBlock')
->will($this->returnValue($this->toolbarMock));

$this->assertEquals(
[$categoryTag, $productTag],
$this->block->getIdentities()
Expand Down

0 comments on commit dda8385

Please sign in to comment.