X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FSiteConfiguration.php;h=cab98a7c63003deae11699275fb953f1cda4a3b4;hp=b400797c583366c6306556eaad14c5dcba9b2894;hb=25242105e8fd03c9900250bdf9ea91be9a286625;hpb=80829cae647324fdf6abb7c78e5b0cfd076ee294 diff --git a/includes/SiteConfiguration.php b/includes/SiteConfiguration.php index b400797c58..cab98a7c63 100644 --- a/includes/SiteConfiguration.php +++ b/includes/SiteConfiguration.php @@ -582,14 +582,14 @@ class SiteConfiguration { * which is not fun * * @param array $array1 + * @param array ...$arrays * * @return array */ - static function arrayMerge( $array1/* ... */ ) { + static function arrayMerge( array $array1, ...$arrays ) { $out = $array1; - $argsCount = func_num_args(); - for ( $i = 1; $i < $argsCount; $i++ ) { - foreach ( func_get_arg( $i ) as $key => $value ) { + foreach ( $arrays as $array ) { + foreach ( $array as $key => $value ) { if ( isset( $out[$key] ) && is_array( $out[$key] ) && is_array( $value ) ) { $out[$key] = self::arrayMerge( $out[$key], $value ); } elseif ( !isset( $out[$key] ) || !$out[$key] && !is_numeric( $key ) ) {