$addressSequence = array_flip($config->addressSequence());
- if ($relContact) {
+ if (!empty($relContact)) {
$elements = array(
"phone_1_phone" =>
$location['phone'][1]['phone'],
}
}
- $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',
}
$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}"]);
}