X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=includes%2FSiteConfiguration.php;h=cab98a7c63003deae11699275fb953f1cda4a3b4;hb=71f386d4e714ed0144ad5569d99b60a1f5ebfe5a;hp=b400797c583366c6306556eaad14c5dcba9b2894;hpb=a38af7ba26579bb3004f673e44d39710887763aa;p=lhc%2Fweb%2Fwiklou.git 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 ) ) {