Home » Console » Console_Getargs » Bug #1823
The getHelp() method ignores user-defined header for the helptext
Details
| Submitted | 2004-07-08 10:23 UTC |
|---|---|
| From | contact at jenskleikamp dot de |
| Assigned | scottmattocks |
| Status | Closed |
| Package | Console_Getargs |
| PHP Version | 4.3.6 |
| OS | x86 Linux |
| Roadmaps | (Not assigned) |
Comments
[2004-07-08 10:23 UTC] contact at jenskleikamp dot de
Description:
------------
PEAR Version 1.3.1
Console_Getargs 0.1.0
CVS Version of Getargs.php: 1.1
The public getHelp() method ignores the optional parameter for the header of the help.
Reproduce code:
---------------
#!/usr/bin/php -q
<?php
require_once('Console/Getargs.php');
$config = array('debug' => array('short' => 'd', 'desc' => 'Show current DAO settings'),
'help' => array('short' => 'h', 'desc' => 'Show help information.'));
echo Console_Getargs::getHelp($config, Usage: Foo')."\n";
?>
Expected result:
----------------
bin $ ./getargs_test.php
Usage: Foo
-d --debug Show current DAO Settings
-h --help Show help information.
Actual result:
--------------
bin $ ./getargs_test.php
-d --debug Show current DAO Settings
-h --help Show help information.