summaryrefslogtreecommitdiffstats
path: root/lib/private/Mail/EMailTemplate.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Mail/EMailTemplate.php')
-rw-r--r--lib/private/Mail/EMailTemplate.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/private/Mail/EMailTemplate.php b/lib/private/Mail/EMailTemplate.php
index b0378496d9e..805126d2ad8 100644
--- a/lib/private/Mail/EMailTemplate.php
+++ b/lib/private/Mail/EMailTemplate.php
@@ -335,7 +335,8 @@ EOF;
* Adds a heading to the email
*
* @param string $title
- * @param string $plainTitle Title that is used in the plain text email - if empty the $title is used
+ * @param string $plainTitle|bool Title that is used in the plain text email
+ * if empty the $title is used, if false none will be used
*/
public function addHeading($title, $plainTitle = '') {
if ($this->footerAdded) {
@@ -346,7 +347,9 @@ EOF;
}
$this->htmlBody .= vsprintf($this->heading, [htmlspecialchars($title)]);
- $this->plainBody .= $plainTitle . PHP_EOL . PHP_EOL;
+ if ($plainTitle !== false) {
+ $this->plainBody .= $plainTitle . PHP_EOL . PHP_EOL;
+ }
}
/**