mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-06-26 14:39:25 +02:00
FIX: Email::render() generating object instead of string for plaintext part (fixes #9069)
This commit is contained in:
parent
7124313711
commit
8e87264864
|
@ -792,10 +792,10 @@ class Email extends ViewableData
|
|||
|
||||
// Do not interfere with emails styles
|
||||
Requirements::clear();
|
||||
|
||||
|
||||
// Render plain part
|
||||
if ($plainTemplate && !$plainPart) {
|
||||
$plainPart = $this->renderWith($plainTemplate, $this->getData());
|
||||
$plainPart = $this->renderWith($plainTemplate, $this->getData())->Plain();
|
||||
}
|
||||
|
||||
// Render HTML part, either if sending html email, or a plain part is lacking
|
||||
|
@ -809,7 +809,7 @@ class Email extends ViewableData
|
|||
$htmlPartObject = DBField::create_field('HTMLFragment', $htmlPart);
|
||||
$plainPart = $htmlPartObject->Plain();
|
||||
}
|
||||
|
||||
|
||||
// Rendering is finished
|
||||
Requirements::restore();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user