From: Seamus Lee Date: Fri, 1 Jul 2022 02:33:29 +0000 (+1000) Subject: [REF][PHP8.1] Fix default values which triggeres deprecation notices in php8.1 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=36715d2351fa4ee9275e20375f24955604d1bdcb;p=civicrm-core.git [REF][PHP8.1] Fix default values which triggeres deprecation notices in php8.1 Switch to non array::value format --- diff --git a/CRM/Utils/GeocodeProvider.php b/CRM/Utils/GeocodeProvider.php index 8a0acc4bad..1089cdfa7e 100644 --- a/CRM/Utils/GeocodeProvider.php +++ b/CRM/Utils/GeocodeProvider.php @@ -50,7 +50,7 @@ class CRM_Utils_GeocodeProvider { */ public static function getUsableClassName() { if (self::$providerClassName === NULL) { - $provider = Civi::settings()->get('geoProvider'); + $provider = Civi::settings()->get('geoProvider') ?? ''; if (!class_exists($provider)) { if (class_exists('CRM_Utils_Geocode_' . $provider)) { $provider = 'CRM_Utils_Geocode_' . $provider; diff --git a/Civi/Core/SqlTriggers.php b/Civi/Core/SqlTriggers.php index b1ac987d53..a6af10858f 100644 --- a/Civi/Core/SqlTriggers.php +++ b/Civi/Core/SqlTriggers.php @@ -120,7 +120,7 @@ class SqlTriggers { ); $variables = str_replace($template_params, $template_values, - \CRM_Utils_Array::value('variables', $value) + $value['variables'] ?? '' ); if (!isset($triggers[$tableName][$eventName])) {