Skip to content

Commit ebb8f6f

Browse files
committed
Fix tests
1 parent c337b97 commit ebb8f6f

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

classes/Wrapper/ProductWrapper.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ public function prepareItemListFromProductList($productList, $useProvidedQuantit
8484
*
8585
* @param array $productIds
8686
*/
87-
private function loadCategories($productIds) {
87+
private function loadCategories($productIds)
88+
{
8889
if (empty($productIds)) {
8990
return;
9091
}
@@ -94,12 +95,12 @@ private function loadCategories($productIds) {
9495

9596
// Initialize our cache
9697
$this->categories = [];
97-
foreach($productIds as $id) {
98+
foreach ($productIds as $id) {
9899
$this->categories[(int) $id] = [];
99100
}
100101

101102
// Load categories for all products
102-
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(
103+
$result = Db::getInstance()->executeS(
103104
'
104105
SELECT cp.`id_category`, cp.`id_product`, cl.`name` FROM `' . _DB_PREFIX_ . 'category_product` cp
105106
LEFT JOIN `' . _DB_PREFIX_ . 'category` c ON (c.id_category = cp.id_category)

0 commit comments

Comments
 (0)