Skip to content
Snippets Groups Projects
Unverified Commit 8dcf392f authored by colemanw's avatar colemanw Committed by GitHub
Browse files

Merge pull request #23761 from eileenmcnaughton/invalid_state_with_country

#3512 fix rc fatal error when state is invalid
parents d76cb822 08086255
Branches
Tags
No related merge requests found
......@@ -1785,6 +1785,9 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Import_Parser {
* @throws \Civi\API\Exception\UnauthorizedException
*/
private function tryToResolveStateProvince(string $stateProvince, $countryID) {
if ($stateProvince === 'invalid_import_value') {
return $stateProvince;
}
// Try to disambiguate since we likely have the country now.
$possibleStates = $this->ambiguousOptions['state_province_id'][mb_strtolower($stateProvince)];
if ($countryID) {
......
......@@ -6,3 +6,4 @@ Susie,Jones,susie@example.com,,AU,New South Wales,New South Wales,AU,AU,New Sout
Susie,Jones,susie@example.com,,1013,New South Wales,,1013,1013,New South Wales,Mum,Jones,mum@example.com,New South Wales,1013,,1013,New South Wales,1013,New South Wales,Valid,
Susie,Jones,susie@example.com,,AUSTRALIA,,,,,,Mum,Jones,mum@example.com,,austRalia,,,,,,Valid,
Susie,Jones,susie@example.com,,AU,NEW South Wales,NEW South Wales,AU,AU,NEW South Wales,Mum,Jones,mum@example.com,NEW South Wales,AU,,AU,NEW South Wales,Australia,NEW South Wales,Valid,
Susie,Jones,susie@example.com,,AU,My own personal fiefdom,My own personal fiefdom,AU,AU,My own personal fiefdom,Mum,Jones,mum@example.com,My own personal fiefdom,AU,,AU,My own personal fiefdom,Australia,My own personal fiefdom,Invalid,rando
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment