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)
69
69
$ this ->productLinkRepository ->delete ($ link );
70
70
}
71
71
}
72
- $ productLinks = $ entity ->getProductLinks ();
73
72
74
73
// Build links per type
75
74
$ linksByType = [];
76
- foreach ($ productLinks as $ link ) {
75
+ foreach ($ entity -> getProductLinks () as $ link ) {
77
76
$ linksByType [$ link ->getLinkType ()][] = $ link ;
78
77
}
79
78
@@ -99,10 +98,10 @@ public function execute($entityType, $entity)
99
98
100
99
/**
101
100
* Check if at least one link without position
102
- * @param $links
101
+ * @param array $links
103
102
* @return bool
104
103
*/
105
- public function hasPosition ($ links )
104
+ private function hasPosition ($ links )
106
105
{
107
106
foreach ($ links as $ link ) {
108
107
if (!array_key_exists ('position ' , $ link ->getData ())) {
You can’t perform that action at this time.
0 commit comments