[REF][PHP8.1] Fix default values which triggeres deprecation notices in php8.1
authorSeamus Lee <seamuslee001@gmail.com>
Fri, 1 Jul 2022 02:33:29 +0000 (12:33 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Fri, 1 Jul 2022 22:10:32 +0000 (08:10 +1000)
Switch to non array::value format

CRM/Utils/GeocodeProvider.php
Civi/Core/SqlTriggers.php

index 8a0acc4badfb571665733c90d3895bb2f179ce0b..1089cdfa7e8164867f5c8645dd42d3f9f857ca86 100644 (file)
@@ -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;
index b1ac987d532fe8bcc811ebe444dd6cd88d4d058c..a6af10858fd7cf5f3d6e509be198dddba9ac8155 100644 (file)
@@ -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])) {