From 36715d2351fa4ee9275e20375f24955604d1bdcb Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Fri, 1 Jul 2022 12:33:29 +1000 Subject: [PATCH] [REF][PHP8.1] Fix default values which triggeres deprecation notices in php8.1 Switch to non array::value format --- CRM/Utils/GeocodeProvider.php | 2 +- Civi/Core/SqlTriggers.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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])) { -- 2.25.1