CRM-13995 - Add is_object check to prevent notices.
authorDave Greenberg <dave@civicrm.org>
Tue, 7 Jan 2014 02:35:59 +0000 (18:35 -0800)
committerDave Greenberg <dave@civicrm.org>
Tue, 7 Jan 2014 02:35:59 +0000 (18:35 -0800)
----------------------------------------
* CRM-13995: contact export when merging households: some household fields missing
  http://issues.civicrm.org/jira/browse/CRM-13995

CRM/Export/BAO/Export.php

index 1ed6118deabf24c8f346c8817b5f37676e03a868..029aa5ee758a9d6553eb91ecdb3ba2f797f1c508 100644 (file)
@@ -871,7 +871,7 @@ INSERT INTO {$componentTable} SELECT distinct gc.contact_id FROM civicrm_group_c
                 }
               }
               // CRM-13995
-              elseif (in_array($relationField, array(
+              elseif (is_object($relDAO) && in_array($relationField, array(
                 'email_greeting', 'postal_greeting', 'addressee'))) {
                 //special case for greeting replacement
                 $fldValue = "{$relationField}_display";