Uncaught Error: Call to a member function addItem() on array in app/code/Magento/Sales/Model/Order/Shipment.php #8022
Labels
bug report
Component: Sales
Fixed in 2.2.x
The issue has been fixed in 2.2 release line
Issue: Clear Description
Gate 2 Passed. Manual verification of the issue description passed
Issue: Confirmed
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed
Issue: Format is valid
Gate 1 Passed. Automatic verification of issue format passed
Issue: Ready for Work
Gate 4. Acknowledged. Issue is added to backlog and ready for development
Reproduced on 2.1.x
The issue has been reproduced on latest 2.1 release
Reproduced on 2.2.x
The issue has been reproduced on latest 2.2 release
Reproduced on 2.3.x
The issue has been reproduced on latest 2.3 release
When adding a Track to a Shipment programmatically.
Preconditions
Steps to reproduce
Make a call
$shipment->getTracks();
Create a Track model and try to add it to the Shipment
Expected result
Actual result
You will receive an error Call to a member function addItem() on array because the method getTracksCollection() in Shipment model will return an array instead of Collection Object.
The text was updated successfully, but these errors were encountered: