Skip to content

Commit

Permalink
Merge pull request #27998 from totten/5.67-config-arraynull
Browse files Browse the repository at this point in the history
PHP 8.x: fix TypeError in config hook
  • Loading branch information
eileenmcnaughton authored Nov 2, 2023
2 parents f250b66 + daa924f commit 8a0d3b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRM/Utils/Hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8a0d3b8

Please sign in to comment.