ZF-9789: Zend/Mail/Part getHeader doesn't allow for nested arrays
Description
works fine for flat arrays but for nested arrays (nested multipart bodys specifially) requries iterative reduction.
Recommendation: class Zend_Mail_Part line: c. 360
public function _header_join($txt, $item) {
if ($txt) {
$txt.= Zend_Mime::LINEEND;
}
if (is_array($item)) {
$item = array_reduce($item, array($this, '_header_join'), '');
}
$txt .= $item;
return $txt;
}
switch ($format) {
case 'string':
if (!$header || (!count($header))){
$header = '';
} elseif (is_array($header)) {
$header = array_reduce($header, array($this, '_header_join'), '');
}
break;
case 'array':
$header = (array)$header;
default:
// do nothing
}
Comments
Posted by Dolf Schimmel (Freeaqingme) (freak) on 2010-12-04T14:19:28.000+0000
Could you please supply a usecase that currently fails?