Skip to content

Commit

Permalink
FIX: Email::render() generating object instead of string for plaintex…
Browse files Browse the repository at this point in the history
…t part (fixes #9069)
  • Loading branch information
kinglozzer committed Jun 14, 2019
1 parent 7124313 commit 8e87264
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Control/Email/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -792,10 +792,10 @@ public function render($plainOnly = false)

// 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
Expand All @@ -809,7 +809,7 @@ public function render($plainOnly = false)
$htmlPartObject = DBField::create_field('HTMLFragment', $htmlPart);
$plainPart = $htmlPartObject->Plain();
}

// Rendering is finished
Requirements::restore();

Expand Down

0 comments on commit 8e87264

Please sign in to comment.