Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regression from PR #103. Forgot to use array access by reference... #111

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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