File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
app/code/Magento/Catalog/Model/Product/Link Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -69,11 +69,10 @@ public function execute($entityType, $entity)
6969 $ this ->productLinkRepository ->delete ($ link );
7070 }
7171 }
72- $ productLinks = $ entity ->getProductLinks ();
7372
7473 // Build links per type
7574 $ linksByType = [];
76- foreach ($ productLinks as $ link ) {
75+ foreach ($ entity -> getProductLinks () as $ link ) {
7776 $ linksByType [$ link ->getLinkType ()][] = $ link ;
7877 }
7978
@@ -99,10 +98,10 @@ public function execute($entityType, $entity)
9998
10099 /**
101100 * Check if at least one link without position
102- * @param $links
101+ * @param array $links
103102 * @return bool
104103 */
105- public function hasPosition ($ links )
104+ private function hasPosition ($ links )
106105 {
107106 foreach ($ links as $ link ) {
108107 if (!array_key_exists ('position ' , $ link ->getData ())) {
You can’t perform that action at this time.
0 commit comments