Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.2.2

Doc Bug #18397 List action example is wrong
Submitted: 2011-03-24 23:25 UTC
From: farell Assigned: cweiske
Status: Closed Package: Console_CommandLine (version 1.1.3)
PHP Version: 5.3.5 OS:
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 48 - 45 = ?

 
 [2011-03-24 23:25 UTC] farell (Laurent Laville)
Description: ------------ List action example at bottom of page http://pear.php.net/manual/en/package.console.console-commandline.options.php is wrong. David (izi) gave me the right version. I'm so stupid, I just see user note on footer that confirm what David told me offline . Expected result: ---------------- <?php $parser->addOption('list_colors', array( 'short_name' => '-l', 'long_name' => '--list-colors', 'action' => 'List', 'action_params' => array( 'list' => array('blue', 'green', 'yellow'), 'delimiter' => ', ' // optional ) )); $result = $parser->parse(); ?> Actual result: -------------- <?php $parser->addOption('list_colors', array( 'short_name' => '-l', 'long_name' => '--list-colors', 'action' => 'List', 'list' => array('blue', 'green', 'yellow') )); $result = $parser->parse(); ?>

Comments

 [2015-12-10 18:40 UTC] cweiske (Christian Weiske)
-Status: Open +Status: Closed -Assigned To: +Assigned To: cweiske
Fixed in peardoc's svn.