From b18bf0dab72bbd66d5032ca6ac46f63b901d533f Mon Sep 17 00:00:00 2001 From: Marek Isalski Date: Tue, 22 Jan 2019 08:25:25 +0000 Subject: [PATCH] fixup runtime warnings --- fulcrm_shoppingcart.module | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fulcrm_shoppingcart.module b/fulcrm_shoppingcart.module index 61d34b7..45443c5 100644 --- a/fulcrm_shoppingcart.module +++ b/fulcrm_shoppingcart.module @@ -552,6 +552,7 @@ function fulcrm_shoppingcart_buy_eventbookingtype_form( $form, &$form_state, $pe '#options' => $persons, ); } else { + $form[ 'ticket_for_persons' ] = array( '#options' => array() ); if ( $eventbookingtype[ 'person_ddatacollection' ] ) { $collection_id = $eventbookingtype[ 'person_ddatacollection' ][ 'id' ]; $collection_data = fulcrm_apiv2_GET( 'ddatacollection/' . $collection_id . '/' ); @@ -562,9 +563,7 @@ function fulcrm_shoppingcart_buy_eventbookingtype_form( $form, &$form_state, $pe $form[ '#submit' ] = 'fulcrm_shoppingcart_buy_eventbookingtype_person_add_guest_form_submit'; } - $form[ 'eventslots' ] = array( '#title' => 'Itinerary', - '#type' => 'fieldset', - ); + $form[ 'eventslots' ] = array(); $eventslots = array(); $eventpart = array(); foreach ( $eventbookingtype[ 'event' ][ 'eventparts' ] as $eventpart ) { @@ -608,6 +607,9 @@ function fulcrm_shoppingcart_buy_eventbookingtype_form( $form, &$form_state, $pe } } + $form[ 'eventslots' ][ '#title' ] = 'Itinerary'; + $form[ 'eventslots' ][ '#type' ] = 'fieldset'; + $form[ 'actions' ] = array( '#type' => 'actions' ); $form[ 'actions' ][ 'submit' ] = array( '#type' => 'submit', '#value' => t('Add to Cart'),