Update CheckoutAJAX.php
authorAlex <rrocxela@gmail.com>
Tue, 10 Dec 2013 17:28:46 +0000 (17:28 +0000)
committerAlex <rrocxela@gmail.com>
Tue, 10 Dec 2013 17:28:46 +0000 (17:28 +0000)
Fix for Fatal Error: Cannot pass parameter 1 by reference line 16 of modules/civicrm/CRM/Event/Cart/Page/CheckoutAJAX.php

CRM/Event/Cart/Page/CheckoutAJAX.php

index 218d85685b454d0aa06223bda025c772553bebf9..590ecc005d25f44fb039c5bc172b514669c2ba98 100644 (file)
@@ -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();