This repository was archived by the owner on Dec 19, 2019. It is now read-only.
This repository was archived by the owner on Dec 19, 2019. It is now read-only.
Notice: Undefined offset: 1 in app/code/Magento/QuoteGraphQl/Model/Resolver/ShippingAddress/SelectedShippingMethod.php on line 35 #657
Closed
Description
Preconditions (*)
- No preconditions
Steps to reproduce (*)
- Create empty cart and copy cart_id to the step 5
- Add simple product
- Set shipping address on cart
- Try this magic: copy the request body and do not prettify it (one line request)
mutation setBillingAddressOnCart($cart_id: String! $firstname: String! $lastname: String! $street_lines: [String] !$city: String! $region: String! $postcode: String! $country_code: String! $telephone: String!) { setBillingAddressOnCart(input: { cart_id: $cart_id billing_address: { address: { firstname: $firstname lastname: $lastname street: $street_lines city: $city region: $region postcode: $postcode country_code: $country_code telephone: $telephone save_in_address_book: false } } }) { cart { shipping_addresses { postcode region { label code } selected_shipping_method { carrier_code method_code } } billing_address { postcode city region { label code } } available_payment_methods { code title } } } }
- Copy variables:
{
"postcode" : "90230",
"telephone" : "555-555-55-55",
"street_lines" : [
"6161 West Centinella Avenue"
],
"region" : "CA",
"lastname" : "Doe",
"city" : "Culver City",
"cart_id" : "{{ cart_id }}",
"firstname" : "John",
"country_code" : "us"
}
- Send
Expected result (*)
- Validation
Actual result (*)
- Internal Server Error
{
"errors": [
{
"debugMessage": "Notice: Undefined offset: 1 in /var/www/html/m2-test/app/code/Magento/QuoteGraphQl/Model/Resolver/ShippingAddress/SelectedShippingMethod.php on line 35",
"message": "Internal server error",
"category": "internal",
"locations": [
{
"line": 10,
"column": 9
}
],
"path": [
"setBillingAddressOnCart",
"cart",
"shipping_addresses",
0,
"selected_shipping_method"
]
}
],
"data": {
"setBillingAddressOnCart": {
"cart": {
"shipping_addresses": [
{
"postcode": "90230",
"region": {
"label": "CA",
"code": null
},
"selected_shipping_method": null
}
],
"billing_address": {
"postcode": "90230",
"city": "Culver City",
"region": {
"label": "CA",
"code": "CA"
}
},
"available_payment_methods": [
{
"code": "checkmo",
"title": "Check / Money order"
}
]
}
}
}
}