Skip to content
This repository has been archived by the owner on Apr 22, 2019. It is now read-only.

Fatal error when cron runs because $product is null #105

Closed
wants to merge 1 commit into from

Conversation

TonyDeStefano
Copy link
Contributor

Sometimes getOrderItem()->getProduct() returns null and causes the cron to err out. This prevents the fatal error.

This may only be happening on our development environments due to messy data, but I added this code so I could get your module through our internal QA process. I'm not sure if it's the best fix, but it worked for what I needed. I've starred your repo so that I get notified of any future changes that need to be applied. Thanks for the great work on this!

…on to err out. This prevents the fatal error.

This may only be happening on our development environments due to messy data, but I added this code so I could get your module through our internal QA process. I'm not sure if it's the best fix, but it worked for what I needed. I've starred your repo so that I get notified of any future changes that need to be applied. Thanks for the great work on this!
@rsisco
Copy link

rsisco commented Jan 31, 2018

@TonyDeStefano Thanks for this code, but we'll have to take a slightly different approach to ensure that tax is still captured for the order item when the product is missing. I'm going to close this PR and future updates will be posted to your open issue #104, since that looks to be related.

@rsisco rsisco closed this Jan 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants