Not sure if this is a Coupon or Braintree issue.
When I have the Commerce Braintree module enabled, the Coupon module throws this error:
Warning: array_unshift() expects parameter 1 to be array, null given in commerce_coupon_form_commerce_checkout_form_alter() (line 2120 of /var/www/drupal/sites/all/modules/commerce_coupon/commerce_coupon.module).
This error persists in the latest dev version of the module (7.x-2.0-rc2+14-dev):
Warning: array_unshift() expects parameter 1 to be array, null given in commerce_coupon_form_commerce_checkout_form_alter() (line 2136 of /var/www/drupal/sites/all/modules/commerce_coupon/commerce_coupon.module).
When I disable the Commerce Braintree module and enable a different payment method, this error doesn't occur.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2798995-2.patch | 704 bytes | tuutti |
Comments
Comment #2
tuutti commentedI'm having the same issue. Here's a patch that seems to fix it.
Comment #3
tuutti commentedComment #4
scotwith1tSeems to work for me. I ran into this after enabling braintree as well. I think the coupon module is forgetting about the possibility of going to the Payment pane after review?
Comment #5
mglamanTrue. It's generally assumed that the payment pane is on the review page. This validation hook in seems to deal with the gift card module, and fact it piggybacks on coupons
I'm fine committing the fix for extra validation. It seems that this is very specific when reviewing code comments for this validation hook.
Comment #7
mglamanCommitted, thanks!