optimised changes
[civicrm-core.git] / CRM / Event / Form / Task / Delete.php
index c69c8a9dabaf768863845602015d1bbfb689e568..595da7f8bd9ff5b20a68d255d30dd22f2fc850a8 100644 (file)
@@ -117,7 +117,7 @@ class CRM_Event_Form_Task_Delete extends CRM_Event_Form_Task {
         }
         // delete participant only if it is not an additional participant
         // or if it is additional and its primary participant is not selected in $this->_participantIds.
-        elseif ($primaryParticipantId == NULL || ($primaryParticipantId != NULL && !CRM_Utils_Array::crmInArray($primaryParticipantId, $this->_participantIds))) {
+        elseif (empty($primaryParticipantId) || (!in_array($primaryParticipantId, $this->_participantIds))) {
           CRM_Event_BAO_Participant::deleteParticipant($participantId);
           $deletedParticipants++;
         }