BuyXGetY::findOrCreateOrderItem() is iterating over the order items, attempting to find the given purchasable entity amongst them. Unluckily, this function assumes that every order item must reference a purchasable entity. But the order item's purchased entity is optional. Also, if the referenced entity is no longer existing (has been deleted), this may also be null.

Issue fork commerce-3254521

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

agoradesign created an issue. See original summary.

agoradesign’s picture

Status: Active » Needs review

jsacksick’s picture

Status: Needs review » Fixed

Committed a slightly different patch, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.