Skip to content

Commit f06e4d7

Browse files
committed
Fix testProductWithLinks failing
1 parent 3b2a4fe commit f06e4d7

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

app/code/Magento/CatalogImportExport/Model/Import/Product/LinkProcessor.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@
1919
*/
2020
class LinkProcessor
2121
{
22-
/**
23-
* @var array
24-
*/
25-
private $_linkNameToId = [];
26-
2722
/**
2823
* @var array
2924
*/
@@ -86,7 +81,7 @@ public function saveLinks(
8681
$nextLinkId = $this->resourceHelper->getNextAutoincrement($mainTable);
8782

8883
// pre-load 'position' attributes ID for each link type once
89-
foreach ($this->_linkNameToId as $linkId) {
84+
foreach ($this->linkNameToId as $linkId) {
9085
$select = $importEntity->getConnection()->select()->from(
9186
$resource->getTable('catalog_product_link_attribute'),
9287
['id' => 'product_link_attribute_id']
@@ -138,7 +133,7 @@ private function processLinkBunches(
138133
$productIds[] = $productId;
139134
$productLinkKeys = $this->fetchProductLinks($importEntity, $resource, $productId);
140135
$linkNameToId = array_filter(
141-
$this->_linkNameToId,
136+
$this->linkNameToId,
142137
function ($linkName) use ($rowData) {
143138
return isset($rowData[$linkName . 'sku']);
144139
},

0 commit comments

Comments
 (0)