mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-11 16:38:52 +01:00
fix error forwarding: implode(): Argument #1 ($array) must be of type array, string given
This commit is contained in:
parent
5fdd70e2f9
commit
8bb2946e2a
@ -2313,32 +2313,18 @@ class mail_compose
|
|||||||
//_debug_array($bodyParts);
|
//_debug_array($bodyParts);
|
||||||
$styles = Mail::getStyles($bodyParts);
|
$styles = Mail::getStyles($bodyParts);
|
||||||
|
|
||||||
$fromAddress = implode(', ', $headers['FROM']);
|
$fromAddress = $toAddress = $ccAddress = '';
|
||||||
|
foreach(['FROM' => 'fromAddress', 'TO' => 'toAddress', 'CC' => 'ccAddress'] as $header => $var)
|
||||||
$toAddressA = array();
|
|
||||||
$toAddress = '';
|
|
||||||
foreach ($headers['TO'] as $mailheader) {
|
|
||||||
$toAddressA[] = $mailheader;
|
|
||||||
}
|
|
||||||
if (count($toAddressA)>0)
|
|
||||||
{
|
{
|
||||||
$toAddress = implode(', ', $toAddressA);
|
if (!empty($headers[$header]))
|
||||||
$toAddress = htmlspecialchars(lang("to").": ".$toAddress).($bodyParts['0']['mimeType'] == 'text/html'?"<br>":"\r\n");
|
{
|
||||||
}
|
$$var = htmlspecialchars(lang($header).": ".implode(', ', (array)$headers[$header])).
|
||||||
$ccAddressA = array();
|
($bodyParts['0']['mimeType'] == 'text/html' ? "<br>" : "\r\n");
|
||||||
$ccAddress = '';
|
}
|
||||||
foreach ($headers['CC'] as $mailheader) {
|
|
||||||
$ccAddressA[] = $mailheader;
|
|
||||||
}
|
|
||||||
if (count($ccAddressA)>0)
|
|
||||||
{
|
|
||||||
$ccAddress = implode(', ', $ccAddressA);
|
|
||||||
$ccAddress = htmlspecialchars(lang("cc").": ".$ccAddress).($bodyParts['0']['mimeType'] == 'text/html'?"<br>":"\r\n");
|
|
||||||
}
|
}
|
||||||
// create original message header in users preferred font and -size
|
// create original message header in users preferred font and -size
|
||||||
$this->sessionData['body'] = self::wrapBlockWithPreferredFont(
|
$this->sessionData['body'] = self::wrapBlockWithPreferredFont(
|
||||||
htmlspecialchars(lang("from").": ".$fromAddress)."<br>".
|
$fromAddress.$toAddress.$ccAddress.
|
||||||
$toAddress.$ccAddress.
|
|
||||||
htmlspecialchars(lang("date").": ".Mail::_strtotime($headers['DATE'],'r',true),ENT_QUOTES | ENT_IGNORE, Mail::$displayCharset, false),
|
htmlspecialchars(lang("date").": ".Mail::_strtotime($headers['DATE'],'r',true),ENT_QUOTES | ENT_IGNORE, Mail::$displayCharset, false),
|
||||||
lang("original message"), 'originalMessage');
|
lang("original message"), 'originalMessage');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user