CRM-14681 : fix for non matching contact getting created errorneously
authorPratik Joshi <pratik.joshi@webaccess.co.in>
Fri, 16 May 2014 08:03:59 +0000 (13:33 +0530)
committerPratik Joshi <pratik.joshi@webaccess.co.in>
Fri, 16 May 2014 08:03:59 +0000 (13:33 +0530)
CRM/Contact/Import/Parser/Contact.php

index 2ac24f27cdaeeb750841d9a84bd8a5630b52bd5a..e9fff3152111e899ca5566ea063852dbbf4606af 100644 (file)
@@ -663,7 +663,7 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Contact_Import_Parser {
     //fixed CRM-4148
     //now we create new contact in update/fill mode also.
     $contactID = NULL;
-    if ($createNewContact || $this->_updateWithId) {
+    if ($createNewContact || ($this->_retCode != CRM_Import_Parser::NO_MATCH && $this->_updateWithId)) {
 
       //CRM-4430, don't carry if not submitted.
       foreach (array('prefix_id', 'suffix_id', 'gender_id') as $name) {