diff --git a/CRM/Utils/Hook.php b/CRM/Utils/Hook.php index a4599f2ad468..91587f9e3a3c 100644 --- a/CRM/Utils/Hook.php +++ b/CRM/Utils/Hook.php @@ -1484,7 +1484,7 @@ public static function config(&$config, ?array $flags = NULL) { $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,