File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
app/code/Magento/Downloadable/Controller/Adminhtml/Product/Initialization/Helper/Plugin Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 1111use Magento \Downloadable \Api \Data \SampleInterfaceFactory ;
1212use Magento \Downloadable \Api \Data \LinkInterfaceFactory ;
1313
14+ /**
15+ * Class for initialization downloadable info from request.
16+ */
1417class Downloadable
1518{
1619 /**
@@ -92,6 +95,8 @@ public function afterInitialize(
9295 }
9396 }
9497 $ extension ->setDownloadableProductLinks ($ links );
98+ } else {
99+ $ extension ->setDownloadableProductLinks ([]);
95100 }
96101 if (isset ($ downloadable ['sample ' ]) && is_array ($ downloadable ['sample ' ])) {
97102 $ samples = [];
@@ -107,6 +112,8 @@ public function afterInitialize(
107112 }
108113 }
109114 $ extension ->setDownloadableProductSamples ($ samples );
115+ } else {
116+ $ extension ->setDownloadableProductSamples ([]);
110117 }
111118 $ product ->setExtensionAttributes ($ extension );
112119 if ($ product ->getLinksPurchasedSeparately ()) {
You can’t perform that action at this time.
0 commit comments