Commit 999d52ac authored by Monish Deb's avatar Monish Deb Committed by GitHub

Merge pull request #8956 from TobiasLounsbury/CRM-19278

CRM-19278: Added logic to support all return status codes for the Goo…
parents dce68535 161af008
......@@ -148,17 +148,18 @@ class CRM_Utils_Geocode_Google {
return TRUE;
}
}
elseif ($xml->status == 'OVER_QUERY_LIMIT') {
CRM_Core_Error::debug_var('Geocoding failed. Message from Google: ', (string ) $xml->status);
elseif ($xml->status == 'ZERO_RESULTS') {
// reset the geo code values if we did not get any good values
$values['geo_code_1'] = $values['geo_code_2'] = 'null';
return FALSE;
}
else {
CRM_Core_Error::debug_var("Geocoding failed. Message from Google: ({$xml->status})", (string ) $xml->error_message);
$values['geo_code_1'] = $values['geo_code_2'] = 'null';
$values['geo_code_error'] = $xml->status;
return FALSE;
}
}
// reset the geo code values if we did not get any good values
$values['geo_code_1'] = $values['geo_code_2'] = 'null';
return FALSE;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment