X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2Fregistration%2FExtensionProcessor.php;h=7c60aa5af83329de54062363d7ee1b2e4c35913f;hb=92a52ddc527d5aeb2e7e2e931c23b4a15061378a;hp=fe9304fb61e0da5eb005bcedb4c0a833efe4ae9f;hpb=541b2e7e5b7d08a3e5aab5210455800615209e19;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/registration/ExtensionProcessor.php b/includes/registration/ExtensionProcessor.php index fe9304fb61..7c60aa5af8 100644 --- a/includes/registration/ExtensionProcessor.php +++ b/includes/registration/ExtensionProcessor.php @@ -168,12 +168,12 @@ class ExtensionProcessor implements Processor { $this->extractCredits( $path, $info ); foreach ( $info as $key => $val ) { if ( in_array( $key, self::$globalSettings ) ) { - $this->storeToArray( "wg$key", $val, $this->globals ); + $this->storeToArray( $path, "wg$key", $val, $this->globals ); // Ignore anything that starts with a @ } elseif ( $key[0] !== '@' && !in_array( $key, self::$notAttributes ) && !in_array( $key, self::$creditsAttributes ) ) { - $this->storeToArray( $key, $val, $this->attributes ); + $this->storeToArray( $path, $key, $val, $this->attributes ); } } } @@ -367,14 +367,15 @@ class ExtensionProcessor implements Processor { } /** + * @param string $path * @param string $name * @param array $value * @param array &$array * @throws InvalidArgumentException */ - protected function storeToArray( $name, $value, &$array ) { + protected function storeToArray( $path, $name, $value, &$array ) { if ( !is_array( $value ) ) { - throw new InvalidArgumentException( "The value for '$name' should be an array" ); + throw new InvalidArgumentException( "The value for '$name' should be an array (from $path)" ); } if ( isset( $array[$name] ) ) { $array[$name] = array_merge_recursive( $array[$name], $value );