Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

Notice: Undefined index: shipping_carrier_code is returned instead of Required parameter "shipping_carrier_code" is missin #405

Merged
merged 4 commits into from
Mar 1, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,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