dev/core#3177 Switch sms to use flexmailer token rendering
[civicrm-core.git] / ext / flexmailer / src / Listener / DefaultComposer.php
index d9c61df4a2f97a03f478c8b5fbb7f5ca4fd42a73..93559b8a1a137e2c089c12210764d9788138e039 100644 (file)
@@ -57,7 +57,7 @@ class DefaultComposer extends BaseListener {
       $this->createTokenProcessorContext($e));
 
     $tpls = $this->createMessageTemplates($e);
-    $tp->addMessage('subject', $tpls['subject'], 'text/plain');
+    $tp->addMessage('subject', $tpls['subject'] ?? '', 'text/plain');
     $tp->addMessage('body_text', isset($tpls['text']) ? $tpls['text'] : '',
       'text/plain');
     $tp->addMessage('body_html', isset($tpls['html']) ? $tpls['html'] : '',