From 774e09ad890e7a4f9be799be05b3617b127a1511 Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Mon, 6 Apr 2015 18:41:01 +0530 Subject: [PATCH] Fix for Cannot add participants to event from search --- CRM/Event/BAO/Participant.php | 4 +++- CRM/Event/Form/Participant.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CRM/Event/BAO/Participant.php b/CRM/Event/BAO/Participant.php index fc96c69606..66b8505504 100644 --- a/CRM/Event/BAO/Participant.php +++ b/CRM/Event/BAO/Participant.php @@ -110,7 +110,9 @@ class CRM_Event_BAO_Participant extends CRM_Event_DAO_Participant { $op = key($params['role_id']); $params['role_id'] = $params['role_id'][$op]; } - $params['role_id'] = implode(CRM_Core_DAO::VALUE_SEPARATOR, $params['role_id']); + else { + $params['role_id'] = implode(CRM_Core_DAO::VALUE_SEPARATOR, $params['role_id']); + } } $participantBAO = new CRM_Event_BAO_Participant(); diff --git a/CRM/Event/Form/Participant.php b/CRM/Event/Form/Participant.php index ab8f474cc8..7781bd2cea 100644 --- a/CRM/Event/Form/Participant.php +++ b/CRM/Event/Form/Participant.php @@ -322,7 +322,7 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment $this->_action = CRM_Core_Action::COPY; break; } - parent::preProcess(); + CRM_Contact_Form_Task::preProcessCommon($this); $this->_single = FALSE; $this->_contactId = NULL; -- 2.25.1