----------------------------------------
* CRM-17908: text version of header/footer not used when auto-generating text version of email
https://issues.civicrm.org/jira/browse/CRM-17908
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;