From d8a87436147717e51f5cdbda5226f1cc5750dfbf Mon Sep 17 00:00:00 2001 From: Jamie McClelland Date: Wed, 11 Dec 2013 16:40:26 -0500 Subject: [PATCH] CRM-13957 - import - avoid non-object error ---------------------------------------- * CRM-13957: 2nd page of Import script reports undefined index http://issues.civicrm.org/jira/browse/CRM-13957 --- CRM/Contact/Import/Parser/Contact.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Contact/Import/Parser/Contact.php b/CRM/Contact/Import/Parser/Contact.php index 3784549b64..ae2b5222fd 100644 --- a/CRM/Contact/Import/Parser/Contact.php +++ b/CRM/Contact/Import/Parser/Contact.php @@ -1681,7 +1681,7 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Contact_Import_Parser { } //get the id of the contact whose street address is not parsable, CRM-5886 - if ($this->_parseStreetAddress && $newContact->address) { + if ($this->_parseStreetAddress && is_object($newContact) && property_exists($newContact, 'address') && $newContact->address) { foreach ($newContact->address as $address) { if (!empty($address['street_address']) && (!CRM_Utils_Array::value('street_number', $address) || !CRM_Utils_Array::value('street_name', $address))) { $this->_unparsedStreetAddressContacts[] = array( -- 2.25.1