PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Console » Console_Getargs » Bug #8097

getOptionalRequired throws Notices with E_ALL

Details

Submitted2006-07-01 11:22 UTC
Frombirke at d-scribe dot de
Assignedwenz
StatusClosed
PackageConsole_Getargs
PHP Version4.4.1
Roadmaps(Not assigned)

Comments

[2006-07-01 11:22 UTC] birke at d-scribe dot de

Description:
------------
When configuring without short options in the config string,
getOptionalRequired throws the following error message:

Notice: Undefined index: short in /usr/local/php/lib/php/
Console/Getargs.php on line 432

Test script:
---------------
Here is a patch.
Change lines 431 and 432 to this:

if(isset($def['short']))
{
$def['short'] = explode('|', $def['short']);
$def['short'] = reset($def['short']);
}