From 085927a84357104e17bf09ceb9a235014090f4e8 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Tue, 31 May 2022 10:27:08 +1200 Subject: [PATCH] Another unreachable place - code is always duplicate if it is an array --- CRM/Contact/Import/Parser/Contact.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/CRM/Contact/Import/Parser/Contact.php b/CRM/Contact/Import/Parser/Contact.php index 155578ad7d..e3c450d4f7 100644 --- a/CRM/Contact/Import/Parser/Contact.php +++ b/CRM/Contact/Import/Parser/Contact.php @@ -536,17 +536,7 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Import_Parser { } //dupe checking if (is_array($newContact)) { - $code = NULL; - - if (($code = CRM_Utils_Array::value('code', $newContact['error_message'])) && ($code == CRM_Core_Error::DUPLICATE_CONTACT)) { - return $this->handleDuplicateError($newContact, $values, $onDuplicate, $formatted, $contactFields); - } - // Not a dupe, so we had an error - $errorMessage = $newContact['error_message']; - array_unshift($values, $errorMessage); - $this->setImportStatus((int) $values[count($values) - 1], 'ERROR', $errorMessage); - return CRM_Import_Parser::ERROR; - + return $this->handleDuplicateError($newContact, $values, $onDuplicate, $formatted, $contactFields); } if (empty($this->_unparsedStreetAddressContacts)) { -- 2.25.1