public function escapeList($list)
{
$result = array();
- foreach ($list as $k => $v) {
- if (!is_array($v)) {
+ foreach ($list as $v) {
+ if (is_array($v)) {
+ $result[] = $this->escapeList($v);
+ } else {
// $result[] = $this->escapeString($v);
$result[] = $v;
- continue;
}
- $result[] = $this->escapeList($v);
}
return '(' . implode(' ', $result) . ')';
}
return $this->_headers;
}
- protected static function _formatHeader(&$item, $key, $prefix)
- {
- $item = $prefix . ': ' . $item;
- }
-
protected function _prepareHeaders($headers)
{
if (!$this->_mail) {
$value = implode(',' . $this->EOL . ' ', $content);
$this->header .= $header . ': ' . $value . $this->EOL;
} else {
- array_walk($content, array(get_class($this), '_formatHeader'), $header);
- $this->header .= implode($this->EOL, $content) . $this->EOL;
+ foreach ($content as $value) {
+ $this->header .= $header . ': ' . $value . $this->EOL;
+ }
}
}