CRM-17908 - text version of header/footer not used when auto-generating text version...
authoryashodha <yashodha.chaku@webaccessglobal.com>
Thu, 4 Feb 2016 10:30:46 +0000 (16:00 +0530)
committeryashodha <yashodha.chaku@webaccessglobal.com>
Thu, 4 Feb 2016 10:30:46 +0000 (16:00 +0530)
https://issues.civicrm.org/jira/browse/CRM-17908

CRM/Mailing/BAO/Mailing.php

index f62a3235f19e8960877e4d098f82e3296c6c98cf..0a9ce2ef1f877228e1e476c51684a44d5bc9b778 100644 (file)
@@ -760,7 +760,7 @@ ORDER BY   i.contact_id, i.{$tempColumn}
       $this->templates = array();
       if ($this->body_text || !empty($this->header)) {
         $template = array();
-        if ($this->header->body_text) {
+        if (!empty($this->header->body_text)) {
           $template[] = $this->header->body_text;
         }
         else {
@@ -774,7 +774,7 @@ ORDER BY   i.contact_id, i.{$tempColumn}
           $template[] = CRM_Utils_String::htmlToText($this->body_html);
         }
 
-        if ($this->footer->body_text) {
+        if (!empty($this->footer->body_text)) {
           $template[] = $this->footer->body_text;
         }
         else {