From 3d9846385c40f78883d0c3e3d6d14028e00e24aa Mon Sep 17 00:00:00 2001 From: Marek Isalski Date: Thu, 7 Feb 2019 00:19:36 +0000 Subject: [PATCH] suppress warning for no donation solicited --- fulcrm_shoppingcart.module | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fulcrm_shoppingcart.module b/fulcrm_shoppingcart.module index 9dc276d..4a12f6e 100644 --- a/fulcrm_shoppingcart.module +++ b/fulcrm_shoppingcart.module @@ -792,7 +792,9 @@ function fulcrm_shoppingcart_buy_eventbookingtype( $person, $eventbookingtype, $ function fulcrm_shoppingcart_buy_donation_form_submit( $form, &$form_state ) { $product_id = $form_state[ 'fulcrm_shoppingcart' ][ 'product' ][ 'id' ]; - $donation_amount = floatval( $form_state[ 'values' ][ 'donation_amount' ] ); + $donation_amount = 0.0; + if ( array_key_exists( 'donation_amount', $form_state[ 'values' ] ) ) + $donation_amount = floatval( $form_state[ 'values' ][ 'donation_amount' ] ); if ( $donation_amount > 0.0 ) { $person_uuid = NULL;