Skip to content

Commit

Permalink
PHP 8.x: fix TypeError in config hook
Browse files Browse the repository at this point in the history
  • Loading branch information
mlutfy authored and totten committed Nov 2, 2023
1 parent 192b5c8 commit daa924f
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 daa924f

Please sign in to comment.