From aef8149ff46aa0e0efb584c69ff8362ef6432b2a Mon Sep 17 00:00:00 2001 From: Jamie McClelland Date: Tue, 17 Jun 2014 14:19:51 -0400 Subject: [PATCH] CRM-14865 - ensure contacts and participants arrays are keyed the same To avoid: Notice: Undefined offset: 1 in CRM_Event_Form_Participant->postProcess() (line 1497...) ---------------------------------------- * CRM-14865: Prevent duplicate participants when using offline event registration https://issues.civicrm.org/jira/browse/CRM-14865 --- CRM/Event/Form/Participant.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Event/Form/Participant.php b/CRM/Event/Form/Participant.php index 7b99f87ac7..8fa680d13d 100644 --- a/CRM/Event/Form/Participant.php +++ b/CRM/Event/Form/Participant.php @@ -1005,6 +1005,10 @@ class CRM_Event_Form_Participant extends CRM_Contact_Form_Task { CRM_Core_Session::setStatus(ts("No participants were added.")); return; } + // We have to re-key $this->_contactIds so each contact has the same + // key as their corresponding record in the $participants array that + // will be created below. + $this->_contactIds = array_values($this->_contactIds); } } -- 2.25.1