diff --git a/CRM/Utils/GeocodeProvider.php b/CRM/Utils/GeocodeProvider.php index c5df3cac2a85..5f6a6027a61f 100644 --- a/CRM/Utils/GeocodeProvider.php +++ b/CRM/Utils/GeocodeProvider.php @@ -68,7 +68,7 @@ public static function getUsableClassName() { // or extend a base class. While we identify and implement a geocoding // abstraction library (rather than continue to roll our own), we settle for // this check. - if (!method_exists($provider, 'format') && $provider !== FALSE) { + if ($provider !== FALSE && !method_exists($provider, 'format')) { Civi::log()->error('Configured geocoder is invalid, must provide a format method', ['geocode_class' => $provider]); $provider = FALSE; }