- Issue created by @Anybody
- 🇩🇪Germany Anybody Porta Westfalica
#3495550: Call to a member function hasPurchasedEntity() on null → was another effect of this call.
- First commit to issue fork.
- Merge request !27Issue #3495551: Error: Call to a member function getEntityTypeId() on null → (Closed) created by Grevil
- 🇩🇪Germany Grevil
Alright, this should be it for the time being. I am unsure whether this is the correct approach or if we should allow a quantity of "0" and simply add a NULL check in line 183.
I also thought about implementing the check in the "EntityValidationTrait" "validate()" method, but that class seems really general and not really meant for order item validation, so I dropped the thought again.
- Merge request !28Issue #3495551: Error: Call to a member function getEntityTypeId() on null, when order item quantity is "0" → (Open) created by Grevil
- 🇩🇪Germany Grevil
All done, @jsacksick should decide, which approach to use here!
- 🇩🇪Germany Anybody Porta Westfalica
Thank you very much @grevil! Nice finding and fix!
I'm a bit more in favour of MR!28 I have to say, looks cleaner to me. But let's see what @jacksacksick says!
- 🇩🇪Germany Anybody Porta Westfalica
Failing tests look unrelated, let's open a separate issue for that.
- 🇩🇪Germany Grevil
I will close the !MR 27, just had a look at 🐛 Price calculation fails with a fatal error on zero quantity order items that have adjustments Needs review . And there seems to be a use case for having a quantity of 0.