Merge pull request #12290 from eileenmcnaughton/export
[civicrm-core.git] / CRM / Event / Form / Participant.php
index 6f8d6613062d858db7f93a6e7b7eae6ae9695622..bb16370b55baf2348955c0bb18c6c8827d79bb23 100644 (file)
@@ -910,7 +910,7 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment
       }
       if (!$this->_single && !empty($event_id)) {
         $duplicateContacts = 0;
-        while (list($k, $dupeCheckContactId) = each($this->_contactIds)) {
+        foreach ($this->_contactIds as $k => $dupeCheckContactId) {
           // Eliminate contacts that have already been assigned to this event.
           $dupeCheck = new CRM_Event_BAO_Participant();
           $dupeCheck->contact_id = $dupeCheckContactId;