From: eileen Date: Tue, 6 Aug 2013 21:19:34 +0000 (+1200) Subject: unrelated e-notice fixes X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=fa9c9372163eab185b4c929dc2738088c804a1db;p=civicrm-core.git unrelated e-notice fixes --- 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}"]); }