Skip to content

Commit

Permalink
Merge pull request #20443 from seamuslee001/fix_error_php8
Browse files Browse the repository at this point in the history
[php8-compat] Fix calling method_exist with paremeter that is bool not an object in…
  • Loading branch information
seamuslee001 authored May 29, 2021
2 parents f47a5f7 + bab0b1f commit a76a8c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRM/Utils/GeocodeProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit a76a8c5

Please sign in to comment.