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 2 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'])) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, need to check that value is not empty

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a condition to check empty value. Merge conflict was resolved

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

Expand Down