fatal error when is_email_receipt = null
to reproduce, create an auto-renewing membership via the backend and do not choose to email a receipt. the recurring subscription will be created with Stripe and the contribution will be created, but will remain in a pending state despite receiving the expected IPN notifications.
I traced the issue to: CRM_Core_Payment_MJWIPNTrait::getSendEmailReceipt(). In that function you make the ContributionRecur.getvalue API call. If is_email_receipt is NULL, that API call returns an error:
"invalid_field": "is_email_receipt",
"is_error": 1,
"error_message": "field is_email_receipt unset or not existing"
This is because the get API (which underlies getvalue) doesn't return an array key if the value is NULL for some fields. The error prevents the rest of the IPN processing from finishing, which leaves the contribution in a pending state.
I think we should simply wrap that API call in a try/catch block. You are casting the result as an (int) when you return, so a NULL value would simply cast as FALSE, which is what I think we would want.