CRM-12272
authoryashodha <yashodha.chaku@webaccess.co.in>
Tue, 16 Apr 2013 18:36:21 +0000 (00:06 +0530)
committeryashodha <yashodha.chaku@webaccess.co.in>
Tue, 16 Apr 2013 18:36:21 +0000 (00:06 +0530)
CRM/Event/Form/Registration/AdditionalParticipant.php

index ed4d73528495b9b52e63cbf617f3ff64f6857911..e946064d21d8391db126680ccda27a8bc203c0ee 100644 (file)
@@ -440,8 +440,8 @@ class CRM_Event_Form_Registration_AdditionalParticipant extends CRM_Event_Form_R
             }
             else {
               // check with first_name and last_name for additional participants
-              if ((CRM_Utils_Array::value('first_name',$value) == $fields['first_name']) &&
-                (CRM_Utils_Array::value('last_name',$value) == $fields['last_name'])
+              if (!empty($value['first_name']) && (CRM_Utils_Array::value('first_name', $value) == CRM_Utils_Array::value('first_name', $fields)) &&
+                (CRM_Utils_Array::value('last_name',$value) == CRM_Utils_Array::value('last_name', $fields))
               ) {
                 $errors['first_name'] = ts('The first name and last name must be unique for each participant.');
                 break;