File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
app/code/Magento/Bundle/Model Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,8 @@ public function processOptions(CartItemInterface $cartItem)
83
83
}
84
84
$ productOptions = [];
85
85
$ bundleOptions = $ cartItem ->getBuyRequest ()->getBundleOption ();
86
- $ bundleOptionsQty = $ cartItem ->getBuyRequest ()->getBundleOptionQty () ?? [];
86
+ $ bundleOptionsQty = $ cartItem ->getBuyRequest ()->getBundleOptionQty ();
87
+ $ bundleOptionsQty = is_array ($ bundleOptionsQty ) ? $ bundleOptionsQty : [];
87
88
if (is_array ($ bundleOptions )) {
88
89
foreach ($ bundleOptions as $ optionId => $ optionSelections ) {
89
90
if (empty ($ optionSelections )) {
@@ -95,7 +96,7 @@ public function processOptions(CartItemInterface $cartItem)
95
96
$ productOption = $ this ->bundleOptionFactory ->create ();
96
97
$ productOption ->setOptionId ($ optionId );
97
98
$ productOption ->setOptionSelections ($ optionSelections );
98
- if (is_array ( $ bundleOptionsQty ) && isset ($ bundleOptionsQty [$ optionId ])) {
99
+ if (isset ($ bundleOptionsQty [$ optionId ])) {
99
100
$ productOption ->setOptionQty ($ bundleOptionsQty [$ optionId ]);
100
101
}
101
102
$ productOptions [] = $ productOption ;
You can’t perform that action at this time.
0 commit comments