CRM-17908:text version of header/footer not used when auto-generating
authoryashodha <yashodha.chaku@webaccessglobal.com>
Thu, 4 Feb 2016 09:35:05 +0000 (15:05 +0530)
committeryashodha <yashodha.chaku@webaccessglobal.com>
Thu, 4 Feb 2016 09:35:05 +0000 (15:05 +0530)
----------------------------------------
* CRM-17908: text version of header/footer not used when auto-generating text version of email
  https://issues.civicrm.org/jira/browse/CRM-17908

CRM/Mailing/BAO/Mailing.php

index 7a23b9e8498fc24f740a1d786bbbe1ba4a514727..f62a3235f19e8960877e4d098f82e3296c6c98cf 100644 (file)
@@ -758,7 +758,7 @@ ORDER BY   i.contact_id, i.{$tempColumn}
     if (!$this->templates) {
       $this->getHeaderFooter();
       $this->templates = array();
-      if ($this->body_text || property_exists($this->header, 'body_text') || property_exists($this->footer, 'body_text')) {
+      if ($this->body_text || !empty($this->header)) {
         $template = array();
         if ($this->header->body_text) {
           $template[] = $this->header->body_text;