diff --git a/CRM/Utils/Geocode/Google.php b/CRM/Utils/Geocode/Google.php index db01763639de..bdb4a31a33d0 100644 --- a/CRM/Utils/Geocode/Google.php +++ b/CRM/Utils/Geocode/Google.php @@ -82,7 +82,7 @@ public static function format(&$values, $stateName = FALSE) { $add .= ',+'; } - if (!empty($values['state_province'])) { + if (!empty($values['state_province']) || !empty($values['state_province_id'])) { if (!empty($values['state_province_id'])) { $stateProvince = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_StateProvince', $values['state_province_id']); } diff --git a/CRM/Utils/Geocode/Yahoo.php b/CRM/Utils/Geocode/Yahoo.php index 2300026e56a1..4d1869034008 100644 --- a/CRM/Utils/Geocode/Yahoo.php +++ b/CRM/Utils/Geocode/Yahoo.php @@ -79,7 +79,7 @@ public static function format(&$values, $stateName = FALSE) { $whereComponents['city'] = $city; } - if (!empty($values['state_province'])) { + if (!empty($values['state_province']) || !empty($values['state_province_id'])) { if (!empty($values['state_province_id'])) { $stateProvince = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_StateProvince', $values['state_province_id']); }