Issue Type: Bug Created: 2009-03-05T02:46:40.000+0000 Last Updated: 2009-12-18T13:28:54.000+0000 Status: Resolved Fix version(s): - 1.9.7 (11/Jan/10)
Reporter: Jan Olsen (janpolsen) Assignee: Menno Luiten (mluiten) Tags: - Zend_Console_Getopt
Related issues: Attachments: - ZF-5948.patch
->setArguments() require an array as the only parameter, but setting it to something else i.e. a string or number will cause ->parse() to jump into a neverending loop at line 697: Warning: array_shift(): The argument should be an array in \includes\ZendFramework-1.7.4\library\Zend\Console\Getopt.php on line 697
An error message both in ->setArguments() and ->parse() would be more apropriate :)
Posted by Menno Luiten (mluiten) on 2009-12-18T01:23:42.000+0000
Attached patch to throw Zend_Console_Getopt_Exception when not given an array as parameter. Another solution would be to transform the non-array value into an array and work with that. However, current documentation would suggest the Exception should be the expected behaviour.
Posted by Menno Luiten (mluiten) on 2009-12-18T13:28:54.000+0000
Resolved in r19765
Have you found an issue?
See the Overview section for more details.