Skip to content

Commit

Permalink
Merge pull request #111 from colinmollenhour/fix-pr103-regression
Browse files Browse the repository at this point in the history
Fix regression from PR #103. Forgot to use array access by reference...
  • Loading branch information
colinmollenhour committed Oct 11, 2016
2 parents 33852b9 + 6244f7b commit 7f1a054
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/code/core/Mage/CatalogInventory/Model/Resource/Stock.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ public function getProductsStock($stock, $productIds, $lockRows = false)
// so using a separate query here significantly reduces the number of
// unnecessarily locked rows in other tables, thereby avoiding deadlocks.
$select = $this->_getWriteAdapter()->select()
->from($productTable, ['entity_id', 'type_id'])
->from($productTable, array('entity_id', 'type_id'))
->where('entity_id IN(?)', $productIds);
$typeIds = $this->_getWriteAdapter()->fetchPairs($select);
foreach ($rows as $row) {
foreach ($rows as &$row) {
$row['type_id'] = $typeIds[$row['product_id']];
}
return $rows;
Expand Down

0 comments on commit 7f1a054

Please sign in to comment.