Skip to content

Commit

Permalink
Merge pull request #42 from systopia/dont-enforce-certain-parameters-…
Browse files Browse the repository at this point in the history
…for-lookup

Don't enforce certain parameters for lookup
  • Loading branch information
dontub authored Jun 4, 2024
2 parents 3e1d8ff + cd4a343 commit 6231ab8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions CRM/Utils/Geocode/OpenStreetMapCoding.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,9 @@ public static function format(&$values, $stateName = FALSE) {
$params['country'] = $values['country'];
}

// There should be at least a city or postal_code, a street and a country
if (!(array_key_exists('street', $params)
&& array_key_exists('country', $params)
&& (array_key_exists('city', $params) || array_key_exists('postalcode', $params)))) {
// the error logging is disabled, because it potentially produces a lot of log messages
//CRM_Core_Error::debug_log_message('Geocoding failed. Address data is incomplete.');
if (count($params) === 0) {
$values['geo_code_1'] = $values['geo_code_2'] = 'null';

return FALSE;
}

Expand Down

0 comments on commit 6231ab8

Please sign in to comment.