Skip to content

Commit a5eb860

Browse files
authored
ENGCOM-4416: Notice: Undefined index: shipping_carrier_code is returned instead of Required parameter "shipping_carrier_code" is missin #405
2 parents d4d30dc + 06da4f2 commit a5eb860

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
@@ -67,13 +67,13 @@ public function resolve(Field $field, $context, ResolveInfo $info, array $value
6767

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

70-
if (!$shippingMethod['cart_address_id']) {
70+
if (!isset($shippingMethod['cart_address_id']) || empty($shippingMethod['cart_address_id'])) {
7171
throw new GraphQlInputException(__('Required parameter "cart_address_id" is missing'));
7272
}
73-
if (!$shippingMethod['carrier_code']) {
73+
if (!isset($shippingMethod['carrier_code']) || empty($shippingMethod['carrier_code'])) {
7474
throw new GraphQlInputException(__('Required parameter "shipping_carrier_code" is missing'));
7575
}
76-
if (!$shippingMethod['method_code']) {
76+
if (!isset($shippingMethod['method_code']) || empty($shippingMethod['method_code'])) {
7777
throw new GraphQlInputException(__('Required parameter "shipping_method_code" is missing'));
7878
}
7979

0 commit comments

Comments
 (0)