We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b57eb03 commit d8bd657Copy full SHA for d8bd657
app/code/Magento/Bundle/Model/Product/CopyConstructor/Bundle.php
@@ -32,7 +32,8 @@ public function build(Product $product, Product $duplicate)
32
* Set option and selection ids to 'null' in order to create new option(selection) for duplicated product,
33
* but not modifying existing one, which led to lost of option(selection) in original product.
34
*/
35
- foreach ($duplicatedBundleOption->getProductLinks() as $productLink) {
+ $productLinks = $duplicatedBundleOption->getProductLinks() ?: [];
36
+ foreach ($productLinks as $productLink) {
37
$productLink->setSelectionId(null);
38
}
39
$duplicatedBundleOption->setOptionId(null);
0 commit comments