Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.0.2
-
Fix Version/s: 1.7.0
-
Component/s: Zend_Console_Getopt
-
Labels:None
-
Fix Version Priority:Nice to Have
Description
Using addRules() result in some warnings.
reproduce code (example from the manual):
require_once 'Zend/Console/Getopt.php';
$opts = new Zend_Console_Getopt('abp:');
$opts->addRules(
array(
'verbose|v' => 'Print verbose output'
)
);
Output:
PHP Warning: preg_match_all() expects parameter 2 to be string, array given in /Users/carsten/Sites/Zend/Console/Getopt.php on line 814 Warning: preg_match_all() expects parameter 2 to be string, array given in /Users/carsten/Sites/Zend/Console/Getopt.php on line 814 PHP Notice: Undefined offset: 1 in /Users/carsten/Sites/Zend/Console/Getopt.php on line 815 Notice: Undefined offset: 1 in /Users/carsten/Sites/Zend/Console/Getopt.php on line 815 PHP Warning: Invalid argument supplied for foreach() in /Users/carsten/Sites/Zend/Console/Getopt.php on line 815 Warning: Invalid argument supplied for foreach() in /Users/carsten/Sites/Zend/Console/Getopt.php on line 815
Assigned to Bill