ZF-6898: Usage of an uninitialized array in Zend_Console_Getopt
Description
In Zend/Console/Getopt.php line 611 :
$lines[] = $linepart;
$lines has not been initialized as an empty array before the foreach loop. So, if $this->_rules is empty, the foreach never loops, $lines remain undefined, and a warning is sent at line 613 :
foreach ($lines as $linepart) {
I guess a simple :
$lines = array();
at line 585 should resolve the issue.
Comments
Posted by Ramon Henrique Ornelas (ramon) on 2010-07-02T17:35:12.000+0000
Merged to branch release-1.10 r22495.