Disabling "Search Primary Details Only" breaks export of primary address
Migrated from https://issues.civicrm.org/jira/browse/CRM-21423
Disabling the "Search Primary Details Only"* setting switch leads to wrong export of contact primary address.
Reason is that a requested location_type is not set and Export.php's call to CRM_Contact_BAO_Query does not set the default search to use primary location.
A fix was proposed at https://github.com/civicrm/civicrm-core/pull/11274 but has been closed as more tests would need to be written.
* My anecdotal experience is that, if the user has been merging contacts w/ multiple email addresses such that secondary email addresses are fairly common, then there's a frequent need to search across all email addresses, so this setting does need to be disabled.