OSDN Git Service

use $p_value instead of $p_name for positional parameters
authorscribu <mail@scribu.net>
Mon, 5 Aug 2013 22:18:32 +0000 (01:18 +0300)
committerscribu <mail@scribu.net>
Mon, 5 Aug 2013 22:18:32 +0000 (01:18 +0300)
php/WP_CLI/SynopsisParser.php

index d7e4c1b..1da1504 100644 (file)
@@ -42,7 +42,7 @@ class SynopsisParser {
 
                if ( '--<field>=<value>' === $token ) {
                        $param['type'] = 'generic';
-               } elseif ( preg_match( "/^<$p_name>$/", $token, $matches ) ) {
+               } elseif ( preg_match( "/^<$p_value>$/", $token, $matches ) ) {
                        $param['type'] = 'positional';
                } elseif ( preg_match( "/^--$p_name/", $token, $matches ) ) {
                        $param['name'] = $matches[1];