civicrm/civicrm-core — pull request #1886 by pratik-joshi (2013-10-31 11:07:11+00:00)
Title: CRM-13681 : fix for event registration as well as contribution, also consists fixes required in cases where we fetch 'billing' location type id with help of seearching 'Billing' (location type name)

- in v4.3 we were using CRM_Core_PseudoConstant::locationType() - which properly returned (machine readable) 'name' values for location type (intended behavior for approaches like fetching billing id from returned array)
- v4.4 onwards we use CRM_Core_PseudoConstant::get('CRM_Core_BAO_Address', 'location_type_id') - which returns 'display_name' of location types - so thats the reason why billing id is not found and which results in fatal error.
- so CRM-13681 and CRM-13651 are certainly related to above bug.
- also apart from this, i grep-ed for similar approaches in files, found some of them which needs to be improved.

The fix : added $context argument 'validate' in CRM_Core_PseudoConstant::get() which returns 'name' values of location_types
----------------------------------------
* CRM-13681: Can't register to event, pseudo constant for locationtype translated now
http://issues.civicrm.org/jira/browse/CRM-13681