forked from friendica/friendica-addons
need return value hint
This commit is contained in:
parent
025b362290
commit
1fc7334639
1 changed files with 4 additions and 2 deletions
|
@ -416,7 +416,7 @@ function mailstream_send(string $message_id, array $item, array $user): bool
|
||||||
'$upstream' => DI::l10n()->t('Upstream'),
|
'$upstream' => DI::l10n()->t('Upstream'),
|
||||||
'$local' => DI::l10n()->t('Local'),
|
'$local' => DI::l10n()->t('Local'),
|
||||||
'$item' => $item]);
|
'$item' => $item]);
|
||||||
mailstream_html_wrap($mail->Body);
|
$mail->Body = mailstream_html_wrap($mail->Body);
|
||||||
if (!$mail->Send()) {
|
if (!$mail->Send()) {
|
||||||
throw new Exception($mail->ErrorInfo);
|
throw new Exception($mail->ErrorInfo);
|
||||||
}
|
}
|
||||||
|
@ -437,7 +437,8 @@ function mailstream_send(string $message_id, array $item, array $user): bool
|
||||||
* bbcode's output suitable for transmission, we try to break things
|
* bbcode's output suitable for transmission, we try to break things
|
||||||
* up so that lines are about 200 characters.
|
* up so that lines are about 200 characters.
|
||||||
*
|
*
|
||||||
* @param string $text text to word wrap - modified in-place
|
* @param string $text text to word wrap
|
||||||
|
* @return string wrapped text
|
||||||
*/
|
*/
|
||||||
function mailstream_html_wrap(string &$text)
|
function mailstream_html_wrap(string &$text)
|
||||||
{
|
{
|
||||||
|
@ -446,6 +447,7 @@ function mailstream_html_wrap(string &$text)
|
||||||
$lines[$i] = preg_replace('/ /', "\n", $lines[$i], 1);
|
$lines[$i] = preg_replace('/ /', "\n", $lines[$i], 1);
|
||||||
}
|
}
|
||||||
$text = implode($lines);
|
$text = implode($lines);
|
||||||
|
return $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue