Closed
Description
Preconditions (*)
- Using Magento 2.3.4
- USing a custom extension attribute on
Magento\Quote\Api\Data\AddressInterface
Example module here: https://github.com/NathMorgan/module-test-module
Steps to reproduce (*)
- Sending a post request to
estimate-shipping-methods
containing aextension_attributes
For example a post request to /rest/default/V1/guest-carts/{cartId}/estimate-shipping-methods
with the following example data {"address":{"street":["Example High Street"],"city":"Example City","region_id":null,"region":null,"country_id":"GB","postcode":"TES 01","company":"Example Company","telephone":"0000 00000","fax":null,"extension_attributes":{"test_attribute":"2"}}}
Expected result (*)
- Above action completed successfully
Actual result (*)
- 500 Error with the message
Uncaught Error: Call to a member function setDiscounts() on array in /var/www/html/vendor/magento/module-sales-rule/Model/Quote/Discount.php: 117
This issue seems to be introduced with this commit: 6900c38
This seems to effect any extension attribute set on Magento\Quote\Api\Data\AddressInterface
that is not a object
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.4-develop branchGate 2 Passed. Manual verification of the issue description passedGate 1 Passed. Automatic verification of issue format passedIndicates original Magento version for the Issue report.The issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.4-develop branchMajor restrictions or short-term circumventions are required until a fix is available.Issue related to Developer Experience and needs help with Triage to Confirm or Reject it