From bab0b1f0b479ea2f5170bcc2949f8ac4b7b8019b Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Sat, 29 May 2021 02:28:46 +0000 Subject: [PATCH] Fix calling method_exist with paremeter that is bool not an object in php8 --- CRM/Utils/GeocodeProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Utils/GeocodeProvider.php b/CRM/Utils/GeocodeProvider.php index c5df3cac2a..5f6a6027a6 100644 --- a/CRM/Utils/GeocodeProvider.php +++ b/CRM/Utils/GeocodeProvider.php @@ -68,7 +68,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') && $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; } -- 2.25.1