ZF-6898: Usage of an uninitialized array in Zend_Console_Getopt


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.


Merged to branch release-1.10 r22495.