PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

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']);
}