--HR-379 Fix notices coming while importing relationship details
authorNileema <nileema@nileema.(none)>
Mon, 22 Sep 2014 14:39:46 +0000 (20:09 +0530)
committerNileema <nileema@nileema.(none)>
Mon, 22 Sep 2014 14:39:46 +0000 (20:09 +0530)
CRM/Contact/Import/Parser.php

index 9f3b8704f35191de9bffad1c5c960b915aa7ffd6..f648b11e0812c624d102832b2e5ae39352f659f7 100644 (file)
@@ -597,7 +597,8 @@ abstract class CRM_Contact_Import_Parser extends CRM_Import_Parser {
           }
 
           if (isset($this->_activeFields[$i]->_relatedContactLocType) && !empty($this->_activeFields[$i]->_value)) {
-            if (!is_array($params[$this->_activeFields[$i]->_related][$this->_activeFields[$i]->_relatedContactDetails])) {
+            if (!empty($params[$this->_activeFields[$i]->_related][$this->_activeFields[$i]->_relatedContactDetails]) &&
+              !is_array($params[$this->_activeFields[$i]->_related][$this->_activeFields[$i]->_relatedContactDetails])) {
               $params[$this->_activeFields[$i]->_related][$this->_activeFields[$i]->_relatedContactDetails] = array();
             }
             $value = array(