Skip to content

Commit

Permalink
ENGCOM-4416: Notice: Undefined index: shipping_carrier_code is return…
Browse files Browse the repository at this point in the history
…ed instead of Required parameter 'shipping_carrier_code' is missin #405

 - Merge Pull Request magento/graphql-ce#405 from XxXgeoXxX/graphql-ce:2.3-develop#400
 - Merged commits:
   1. 0ae6146
   2. 86857b3
   3. 63f4cfb
   4. 2f3fdc3
  • Loading branch information
magento-engcom-team committed Mar 1, 2019
2 parents 062662d + 2f3fdc3 commit 06da4f2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ public function resolve(Field $field, $context, ResolveInfo $info, array $value

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

if (!$shippingMethod['cart_address_id']) {
if (!isset($shippingMethod['cart_address_id']) || empty($shippingMethod['cart_address_id'])) {
throw new GraphQlInputException(__('Required parameter "cart_address_id" is missing'));
}
if (!$shippingMethod['carrier_code']) {
if (!isset($shippingMethod['carrier_code']) || empty($shippingMethod['carrier_code'])) {
throw new GraphQlInputException(__('Required parameter "shipping_carrier_code" is missing'));
}
if (!$shippingMethod['method_code']) {
if (!isset($shippingMethod['method_code']) || empty($shippingMethod['method_code'])) {
throw new GraphQlInputException(__('Required parameter "shipping_method_code" is missing'));
}

Expand Down

0 comments on commit 06da4f2

Please sign in to comment.