FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=16914&edit=1

ID: 16914
Updated by: izi@php.net
Reported By: izi at php dot net
Summary: Password action doesn't work as expected
-Status: Open
+Status: Closed
Type: Bug
Package: Console_CommandLine
Operating System: linux
Package Version: CVS
PHP Version: Irrelevant
-Assigned To:
+Assigned To: rquadling
Roadmap Versions:
New Comment:

-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: rquadling
Hey Richard,

I've closed the bug and released a 1.1.2 version.
I've also changed your karma to "co-lead" dev on Console_CommandLine,
so you'll be able to do everything next time (close bugs, release
etc...).

Regards,

--
David


Previous Comments:
------------------------------------------------------------------------

[2010-03-29 10:41:08] rquadling

Committed patch. Not sure what needs to change in package.xml nor how
to close this bug - don't think I can.

------------------------------------------------------------------------

[2010-03-26 23:19:41] izi

Hi Richard,

the patch looks ok, if all tests pass and the bug is fixed then commit
away !

thanks,

--
David

------------------------------------------------------------------------

[2010-03-25 17:04:02] rquadling

Added #patch
bug:16914;patch:HandleUndespatchedActions.patch;revision:1269536642;.

------------------------------------------------------------------------

[2010-03-25 16:56:58] rquadling

I've got it working.

After all the tokens have been parsed, parse a null token.

When parsing a null token, don't save it in $args.

And only dispatchactions if the token is not null OR the action is
Password.

All tests pass and so do your tests.

It is a bit hacky though.

Richard.

P.S. Patch incoming. If you like I will commit.

------------------------------------------------------------------------

[2010-03-25 15:41:59] rquadling

I think the bug relates to the value of $argc.

I suspect that the $this (Console_CommandLine) needs to know the number
of parameters for $this parse.

e.g.

-u username -p foo

is actually

-u username -p ($this with argc=3)

and

foo ($this->subcommand with an argc of 1)

Not exactly, yet, sure how to implement this.

I think ... if line 954...

$last = $argc === 0;

was something like ...

$last = ($argc === 0 || the next token is a subcommand);

then that would work just fine.

Trying to work that out...

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://pear.php.net/bugs/bug.php?id=16914

--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=16914&edit=1

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedApr 10, '10 at 9:01a
activeApr 10, '10 at 5:54p
posts2
users2
websitepear.php.net

2 users in discussion

Richard Quadling: 1 post Izi: 1 post

People

Translate

site design / logo © 2021 Grokbase