Skip to content

Commit 7f91490

Browse files
Merge MC-32145 into 2.3.5-bugfixes-031320
2 parents 5293b39 + e9827d6 commit 7f91490

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app/code/Magento/Wishlist/Setup/Patch/Data/CleanUpData.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function __construct(
5858
$this->json = $json;
5959
$this->queryGenerator = $queryGenerator;
6060
$this->queryModifierFactory = $queryModifierFactory;
61-
$this->adapter = $resourceConnection->getConnection();
61+
$this->adapter = $resourceConnection;
6262
}
6363

6464
/**
@@ -68,19 +68,20 @@ public function apply()
6868
{
6969
$wishListItemOptionTable = $this->adapter->getTableName('wishlist_item_option');
7070
$select = $this->adapter
71+
->getConnection()
7172
->select()
7273
->from(
7374
$wishListItemOptionTable,
7475
['option_id', 'value']
7576
);
7677
$iterator = $this->queryGenerator->generate('option_id', $select, self::BATCH_SIZE);
7778
foreach ($iterator as $selectByRange) {
78-
$optionRows = $this->adapter->fetchAll($selectByRange);
79+
$optionRows = $this->adapter->getConnection()->fetchAll($selectByRange);
7980
foreach ($optionRows as $optionRow) {
8081
$rowValue = $this->json->unserialize($optionRow['value']);
8182
unset($rowValue['login']);
8283
$rowValue = $this->json->serialize($rowValue);
83-
$this->adapter->update(
84+
$this->adapter->getConnection()->update(
8485
$wishListItemOptionTable,
8586
['value' => $rowValue],
8687
['option_id = ?' => $optionRow['option_id']]

0 commit comments

Comments
 (0)