From: scribu Date: Thu, 24 Oct 2013 00:08:07 +0000 (+0300) Subject: fix case where a file-only config key would make a runtime arg of the X-Git-Tag: v0.13.0~61^2~4 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=1c4d4bea0c18a11d57ee71ec3d0d6036b387fcbe;p=wvm%2Fwvm.git fix case where a file-only config key would make a runtime arg of the same name disappear --- diff --git a/php/WP_CLI/Configurator.php b/php/WP_CLI/Configurator.php index ed79ee58..ff2d2045 100644 --- a/php/WP_CLI/Configurator.php +++ b/php/WP_CLI/Configurator.php @@ -64,18 +64,17 @@ class Configurator { foreach ( $mixed_args as $tmp ) { list( $key, $value ) = $tmp; - if ( isset( $this->spec[ $key ] ) ) { + if ( isset( $this->spec[ $key ] ) && $this->spec[ $key ]['runtime'] ) { $details = $this->spec[ $key ]; - if ( $details['runtime'] ) { - if ( isset( $details['deprecated'] ) ) { - fwrite( STDERR, "WP-CLI: The --{$key} global parameter is deprecated. {$details['deprecated']}\n" ); - } - if ( $details['multiple'] ) { - $runtime_config[ $key ][] = $value; - } else { - $runtime_config[ $key ] = $value; - } + if ( isset( $details['deprecated'] ) ) { + fwrite( STDERR, "WP-CLI: The --{$key} global parameter is deprecated. {$details['deprecated']}\n" ); + } + + if ( $details['multiple'] ) { + $runtime_config[ $key ][] = $value; + } else { + $runtime_config[ $key ] = $value; } } else { $assoc_args[ $key ] = $value;