[prev in list] [next in list] [prev in thread] [next in thread]
List: pear-cvs
Subject: [PEAR-CVS] =?utf-8?q?svn:_/pear/packages/Console=5FCommandLine/trunk/Console/_CommandLine.php?=
From: Richard_Quadling <rquadling () php ! net>
Date: 2010-03-29 9:42:19
Message-ID: svn-rquadling-1269855739-297057-1985583376 () svn ! php ! net
[Download RAW message or body]
rquadling Mon, 29 Mar 2010 09:42:19 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=297057
Log:
Password action now operates as expected when it is the last parameter or the last \
parameter before a command. Fix #16914.
Bug: http://pear.php.net/bugs/16914 (unknown)
Changed paths:
U pear/packages/Console_CommandLine/trunk/Console/CommandLine.php
Modified: pear/packages/Console_CommandLine/trunk/Console/CommandLine.php
===================================================================
--- pear/packages/Console_CommandLine/trunk/Console/CommandLine.php 2010-03-29 \
08:49:05 UTC (rev 297056)
+++ pear/packages/Console_CommandLine/trunk/Console/CommandLine.php 2010-03-29 \
09:42:19 UTC (rev 297057) @@ -885,6 +885,8 @@
throw $exc;
}
}
+ // Parse a null token to allow any undespatched actions to be despatched.
+ $this->parseToken(null, $result, $args, 0);
// Check if an invalid subcommand was specified. If there are
// subcommands and no arguments, but an argument was provided, it is
// an invalid subcommand.
@@ -978,10 +980,14 @@
if ($lastopt->action == 'StoreArray' &&
!empty($result->options[$lastopt->name]) &&
count($this->args) > ($argc + count($args))) {
- $args[] = $token;
+ if (!is_null($token)) {
+ $args[] = $token;
+ }
return;
}
- $this->_dispatchAction($lastopt, $token, $result);
+ if (!is_null($token) || $lastopt->action == 'Password') {
+ $this->_dispatchAction($lastopt, $token, $result);
+ }
if ($lastopt->action != 'StoreArray') {
$lastopt = false;
}
@@ -1099,7 +1105,9 @@
if (!$stopflag && $this->force_posix) {
$stopflag = true;
}
- $args[] = $token;
+ if (!is_null($token)) {
+ $args[] = $token;
+ }
}
}
--
PEAR CVS Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic