Skip to content
Snippets Groups Projects
Commit bb6a9c76 authored by Wayne Eaker's avatar Wayne Eaker
Browse files

Issue #3381893: Site crashes when sending a plain text email that was...

Issue #3381893: Site crashes when sending a plain text email that was formatted by a different module
parent 943c5dcb
No related branches found
No related tags found
No related merge requests found
...@@ -309,9 +309,12 @@ class SymfonyMailer implements MailInterface, ContainerFactoryPluginInterface { ...@@ -309,9 +309,12 @@ class SymfonyMailer implements MailInterface, ContainerFactoryPluginInterface {
$email->text($plain, $applicable_charset); $email->text($plain, $applicable_charset);
} }
} }
else { else if (is_array($message['body'])) {
$email->text(implode("\r\n", $message['body']), $content_type, $applicable_charset); $email->text(implode("\r\n", $message['body']), $content_type, $applicable_charset);
} }
else {
$email->text($message['body'], $content_type, $applicable_charset);
}
// Validate that $message['params']['files'] is an array. // Validate that $message['params']['files'] is an array.
if (empty($message['params']['files']) || !is_array($message['params']['files'])) { if (empty($message['params']['files']) || !is_array($message['params']['files'])) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment