OSDN Git Service
(root)
/
wvm
/
wvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b720f6d
)
make validate_args() always return an array
author
scribu
<mail@scribu.net>
Fri, 29 Nov 2013 21:40:00 +0000
(23:40 +0200)
committer
scribu
<mail@scribu.net>
Fri, 29 Nov 2013 21:40:03 +0000
(23:40 +0200)
see #883
php/WP_CLI/Dispatcher/Subcommand.php
patch
|
blob
|
history
diff --git
a/php/WP_CLI/Dispatcher/Subcommand.php
b/php/WP_CLI/Dispatcher/Subcommand.php
index
41b7a13
..
8f112c8
100644
(file)
--- a/
php/WP_CLI/Dispatcher/Subcommand.php
+++ b/
php/WP_CLI/Dispatcher/Subcommand.php
@@
-146,10
+146,13
@@
class Subcommand extends CompositeCommand {
return array( $args, $assoc_args );
}
+ /**
+ * @return array list of invalid $assoc_args keys to unset
+ */
private function validate_args( $args, $assoc_args, $extra_args ) {
$synopsis = $this->get_synopsis();
if ( !$synopsis )
- return;
+ return
array()
;
$validator = new \WP_CLI\SynopsisValidator( $synopsis );