-
Notifications
You must be signed in to change notification settings - Fork 154
Notice: Undefined index: shipping_carrier_code is returned instead of Required parameter "shipping_carrier_code" is missin #405
Notice: Undefined index: shipping_carrier_code is returned instead of Required parameter "shipping_carrier_code" is missin #405
Conversation
… Required parameter "shipping_carrier_code" is missing
@@ -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 (!array_key_exists('cart_address_id', $shippingMethod)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can replace with isset
and empty
Please check, why we don't have notices during test running
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
used 'isset' instead array_key_exists
… Required parameter "shipping_carrier_code" is missin magento#405
@@ -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'])) { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
… Required parameter "shipping_carrier_code" is missin
… Required parameter "shipping_carrier_code" is missin
Hi @XxXgeoXxX, thank you for your contribution! |
…ed instead of Required parameter "shipping_carrier_code" is missin #405
Description (*)
Issue: #400
Preconditions (*)
Steps to reproduce (*)
in output
4. Get
ADDRESS_ID
by hovering 'Change Billing Address' or 'Change Shipping Address'Contribution checklist (*)