Merge pull request #13198 from seamuslee001/event_search_561
[civicrm-core.git] / CRM / Utils / GeocodeProvider.php
index 5cc66ce55cae10103d4f8615856c99c9d6028757..e11a2eb67ad98627a5c9f3a2758c01e2a6d3b367 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
   +--------------------------------------------------------------------+
-  | CiviCRM version 4.7                                                |
+  | CiviCRM version 5                                                  |
   +--------------------------------------------------------------------+
   | Copyright CiviCRM LLC (c) 2004-2018                                |
   +--------------------------------------------------------------------+
@@ -84,7 +84,7 @@ class CRM_Utils_GeocodeProvider {
       // 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')) {
+      if (!method_exists($provider, 'format') && $provider !== FALSE) {
         Civi::log()->error('Configured geocoder is invalid, must provide a format method', ['geocode_class' => $provider]);
         $provider = FALSE;
       }