From fa9c9372163eab185b4c929dc2738088c804a1db Mon Sep 17 00:00:00 2001 From: eileen Date: Wed, 7 Aug 2013 09:19:34 +1200 Subject: [PATCH] unrelated e-notice fixes --- CRM/Core/Page/AJAX/Location.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CRM/Core/Page/AJAX/Location.php b/CRM/Core/Page/AJAX/Location.php index 9ddaa3edb3..c07013f02b 100644 --- a/CRM/Core/Page/AJAX/Location.php +++ b/CRM/Core/Page/AJAX/Location.php @@ -62,7 +62,7 @@ class CRM_Core_Page_AJAX_Location { $addressSequence = array_flip($config->addressSequence()); - if ($relContact) { + if (!empty($relContact)) { $elements = array( "phone_1_phone" => $location['phone'][1]['phone'], @@ -147,7 +147,7 @@ class CRM_Core_Page_AJAX_Location { } } - $locTypeId = $location['address'][1]['location_type_id']; + $locTypeId = isset($location['address'][1]) ? $location['address'][1]['location_type_id'] : NULL; $addressFields = array( 'street_address', 'supplemental_address_1', @@ -167,7 +167,7 @@ class CRM_Core_Page_AJAX_Location { } $elements["onbehalf_{$field}-{$locTypeId}"] = array( 'type' => 'Text', - 'value' => $location['address'][1][$addField], + 'value' => isset($location['address'][1]) ? $location['address'][1][$addField] : null, ); unset($profileFields["{$field}-{$locTypeId}"]); } -- 2.25.1