You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR was merged into the 1.0-dev branch.
Discussion
----------
This fixes an undefined offset error caused by holes in ArrayCollection keys after removing units.
Fixes#259
Commits
-------
97245d7 Fix OrderItemsTaxesApplicator with removed units
When items are removed from a Doctrine ArrayCollection, the indexes leave holes.
OrderItemsTaxesApplicator
iterates over the items using an index, causing access to unset array keys:RefundPlugin/src/TaxesApplicator/OrderItemsTaxesApplicator.php
Line 79 in 7016d49
A simple fix would be to either use
$item->getUnits()->getValues()
or (less elegant) use a counter variable as seen in Sylius 1.9.This is critical in my opinion, as it breaks all setups with RefundPlugin, so possibly also Plus.
The text was updated successfully, but these errors were encountered: