From daa924f210b473ee9c754e50f2debdd5dcebd881 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 a4599f2ad4..91587f9e3a 100644 --- a/CRM/Utils/Hook.php +++ b/CRM/Utils/Hook.php @@ -1484,7 +1484,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