From 08c6b770ef81f25fc3202ab3facd3b63a71ad854 Mon Sep 17 00:00:00 2001 From: eileen Date: Thu, 29 Jun 2017 09:08:04 +1200 Subject: [PATCH] CRM-20786 minor code simplification --- CRM/Event/Import/Parser/Participant.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/CRM/Event/Import/Parser/Participant.php b/CRM/Event/Import/Parser/Participant.php index d19eadd171..39c2b4c855 100644 --- a/CRM/Event/Import/Parser/Participant.php +++ b/CRM/Event/Import/Parser/Participant.php @@ -574,12 +574,7 @@ class CRM_Event_Import_Parser_Participant extends CRM_Event_Import_Parser { if (!CRM_Utils_Rule::integer($value)) { return civicrm_api3_create_error("contact_id not valid: $value"); } - $dao = new CRM_Core_DAO(); - $qParams = array(); - $svq = $dao->singleValueQuery("SELECT id FROM civicrm_contact WHERE id = $value", - $qParams - ); - if (!$svq) { + if (!CRM_Core_DAO::singleValueQuery("SELECT id FROM civicrm_contact WHERE id = $value")) { return civicrm_api3_create_error("Invalid Contact ID: There is no contact record with contact_id = $value."); } $values['contact_id'] = $values['participant_contact_id']; -- 2.25.1