mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-06-29 07:59:31 +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
|
// Do not interfere with emails styles
|
||||||
Requirements::clear();
|
Requirements::clear();
|
||||||
|
|
||||||
// Render plain part
|
// Render plain part
|
||||||
if ($plainTemplate && !$plainPart) {
|
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
|
// 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);
|
$htmlPartObject = DBField::create_field('HTMLFragment', $htmlPart);
|
||||||
$plainPart = $htmlPartObject->Plain();
|
$plainPart = $htmlPartObject->Plain();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rendering is finished
|
// Rendering is finished
|
||||||
Requirements::restore();
|
Requirements::restore();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user