diff --git a/libraries/src/Mail/MailTemplate.php b/libraries/src/Mail/MailTemplate.php index 605c44339d07d..b74c2b67d17f5 100644 --- a/libraries/src/Mail/MailTemplate.php +++ b/libraries/src/Mail/MailTemplate.php @@ -325,6 +325,11 @@ public function send() protected function replaceTags($text, $tags) { foreach ($tags as $key => $value) { + // If the value is NULL, replace with an empty string. NULL itself throws notices + if (\is_null($value)) { + $value = ''; + } + if (\is_array($value)) { $matches = []; $pregKey = preg_quote(strtoupper($key), '/');