}
// get the billing location type
- $locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id');
+ $locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id', array(), 'validate');
$billingLocationTypeId = array_search('Billing', $locationTypes);
$blocks = array('email', 'phone', 'im', 'openid');
// fields that are required to calculate greeting and
// also other fields used in tokens etc,
// hence we need to retrieve it again.
- $contact->find(TRUE);
+ if ( $contact->_query !== FALSE ) {
+ $contact->find(TRUE);
+ }
// store object values to an array
$contactDetails = array();