Created
January 25, 2011 14:27
-
-
Save yec/794978 to your computer and use it in GitHub Desktop.
ec_donate.module.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/sites/all/modules/ec_donate/ec_donate.module | |
+++ b/sites/all/modules/ec_donate/ec_donate.module | |
@@ -520,10 +520,11 @@ function ec_donate_form_ec_checkout_product_form_alter(&$form, &$form_state) { | |
} | |
else { | |
// ensure handler runs first | |
- $form['submit']['cart']['#submit'] = array( | |
- 'ec_donate_user_entered_price_form_submit', | |
- reset($form['submit']['cart']['#submit']), | |
- ); | |
+ if ( is_null($form['submit']['cart']['#submit']) ) { | |
+ $form['submit']['cart']['#submit'] = array( 'ec_donate_user_entered_price_form_submit' ); | |
+ } else { | |
+ $form['submit']['cart']['#submit'] = array( 'ec_donate_user_entered_price_form_submit', reset($form['submit']['cart']['#submit']) ); | |
+ } | |
} | |
// do we add a "Donate Now" button | |
if ( isset($node->donate_now) && $node->donate_now) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment