Skip to content

Commit 86857b3

Browse files
committed
Notice: Undefined index: shipping_carrier_code is returned instead of Required parameter "shipping_carrier_code" is missin #405
1 parent 0ae6146 commit 86857b3

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

0 commit comments

Comments
 (0)