Details
Description
Appears that calling Zend_Mail_Storage_Imap::getFolders with an invalid parameter will cause a PHP warning to be thrown as Zend_Mail_Protocol_Imap will attempt to iterate over a boolean value.
reproduce
$mail = new Zend_Mail_Storage_Imap(array(..., 'ssl' => 'SSL'));
$folders = $mail->getFolders('DoesNotExist');
this will eventually end up calling the following code
Zend_Mail_Protocol_Imap::list
public function listMailbox($reference = '', $mailbox = '*') { $result = array(); $list = $this->requestAndResponse('LIST', $this->escapeString($reference, $mailbox)); if (!$list) { return $result; } foreach ($list as $item) { if (count($item) != 4 || $item[0] != 'LIST') { continue; } $result[$item[3]] = array('delim' => $item[2], 'flags' => $item[1]); } return $result; }
Which will cause a PHP Warning when it tries to loop through $list as $list is a bool(true) and not an array.
Please evaluate and categorize/assign as necessary.