Skip to content

Commit 0ae6146

Browse files
committed
Notice: Undefined index: shipping_carrier_code is returned instead of Required parameter "shipping_carrier_code" is missing
1 parent 16036cd commit 0ae6146

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/code/Magento/QuoteGraphQl/Model/Resolver/SetShippingMethodsOnCart.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ public function resolve(Field $field, $context, ResolveInfo $info, array $value
6969

7070
$shippingMethod = reset($shippingMethods); // This point can be extended for multishipping
7171

72-
if (!$shippingMethod['cart_address_id']) {
72+
if (!array_key_exists('cart_address_id', $shippingMethod)) {
7373
throw new GraphQlInputException(__('Required parameter "cart_address_id" is missing'));
7474
}
75-
if (!$shippingMethod['shipping_carrier_code']) {
75+
if (!array_key_exists('shipping_carrier_code', $shippingMethod)) {
7676
throw new GraphQlInputException(__('Required parameter "shipping_carrier_code" is missing'));
7777
}
78-
if (!$shippingMethod['shipping_method_code']) {
78+
if (!array_key_exists('shipping_method_code', $shippingMethod)) {
7979
throw new GraphQlInputException(__('Required parameter "shipping_method_code" is missing'));
8080
}
8181

0 commit comments

Comments
 (0)