File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
app/code/Magento/Catalog/Setup Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -372,13 +372,14 @@ private function changePriceAttributeDefaultScope($categorySetup)
372
372
$ entityTypeId = $ categorySetup ->getEntityTypeId (\Magento \Catalog \Model \Product::ENTITY );
373
373
foreach (['price ' , 'cost ' , 'special_price ' ] as $ attributeCode ) {
374
374
$ attribute = $ categorySetup ->getAttribute ($ entityTypeId , $ attributeCode );
375
- $ categorySetup ->updateAttribute (
376
- $ entityTypeId ,
377
- $ attribute ['attribute_id ' ],
378
- 'is_global ' ,
379
- \Magento \Eav \Model \Entity \Attribute \ScopedAttributeInterface::SCOPE_GLOBAL
380
- );
381
-
375
+ if (isset ($ attribute ['attribute_id ' ])) {
376
+ $ categorySetup ->updateAttribute (
377
+ $ entityTypeId ,
378
+ $ attribute ['attribute_id ' ],
379
+ 'is_global ' ,
380
+ \Magento \Eav \Model \Entity \Attribute \ScopedAttributeInterface::SCOPE_GLOBAL
381
+ );
382
+ }
382
383
}
383
384
}
384
385
}
You can’t perform that action at this time.
0 commit comments