From: Alex Date: Tue, 10 Dec 2013 17:28:46 +0000 (+0000) Subject: Update CheckoutAJAX.php X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=37b5eb89cc34f02a2e8728bab81eb7a188cf633d;p=civicrm-core.git Update CheckoutAJAX.php Fix for Fatal Error: Cannot pass parameter 1 by reference line 16 of modules/civicrm/CRM/Event/Cart/Page/CheckoutAJAX.php --- diff --git a/CRM/Event/Cart/Page/CheckoutAJAX.php b/CRM/Event/Cart/Page/CheckoutAJAX.php index 218d85685b..590ecc005d 100644 --- a/CRM/Event/Cart/Page/CheckoutAJAX.php +++ b/CRM/Event/Cart/Page/CheckoutAJAX.php @@ -8,12 +8,10 @@ class CRM_Event_Cart_Page_CheckoutAJAX { $cart = CRM_Event_Cart_BAO_Cart::find_by_id($_GET['cart_id']); - //XXX security - $participant = CRM_Event_Cart_BAO_MerParticipant::create(array( - 'cart_id' => $cart->id, - 'contact_id' => CRM_Event_Cart_Form_Cart::find_or_create_contact(), - 'event_id' => $event_id, - )); + $params_array = array('cart_id' => $cart->id, 'contact_id' => CRM_Event_Cart_Form_Cart::find_or_create_contact(), 'event_id' => $event_id); + + //XXX security? + $participant = CRM_Event_Cart_BAO_MerParticipant::create($params_array); $participant->save(); $form = new CRM_Core_Form();