From 2231bab4c067a211b810796cb418e89a8531eaa6 Mon Sep 17 00:00:00 2001 From: Mathieu Lu Date: Thu, 2 Nov 2023 15:50:41 -0400 Subject: [PATCH] PHP 8.x: fix TypeError in config hook --- CRM/Utils/Hook.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Utils/Hook.php b/CRM/Utils/Hook.php index e96b976ce4..00e82f3602 100644 --- a/CRM/Utils/Hook.php +++ b/CRM/Utils/Hook.php @@ -1487,7 +1487,7 @@ abstract class CRM_Utils_Hook { $count++; } $defaultFlags = ['civicrm' => FALSE, 'uf' => FALSE, 'instances' => $count]; - $flags = array_merge($defaultFlags, $flags); + $flags = !empty($flags) ? array_merge($defaultFlags, $flags) : $defaultFlags; $null = NULL; return self::singleton()->invoke(['config', 'flags'], $config, $flags, $null, $null, $null, $null, -- 2.25.1