Index: core/kernel/utility/email.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/kernel/utility/email.php (revision 15916) +++ core/kernel/utility/email.php (revision ) @@ -230,7 +230,15 @@ $this->_changeLanguage(false); // 1. set headers + try { - $message_headers = $this->_getHeaders(); + $message_headers = $this->_getHeaders(); + } + catch ( Exception $e ) { + trigger_error('Error parsing e-mail message headers', E_USER_WARNING); + + return false; + } + $message_subject = isset($message_headers['Subject']) ? $message_headers['Subject'] : 'Mail message'; $this->sender->SetSubject($message_subject); @@ -255,8 +263,15 @@ } // 3. set body + try { - $html_message_body = $this->_getMessageBody(true); - $plain_message_body = $this->_getMessageBody(false); + $html_message_body = $this->_getMessageBody(true); + $plain_message_body = $this->_getMessageBody(false); + } + catch ( Exception $e ) { + trigger_error('Error parsing e-mail message body', E_USER_WARNING); + + return false; + } if ( $html_message_body === false && $plain_message_body === false ) { trigger_error('Message template is empty (maybe after parsing).', E_USER_WARNING); @@ -859,4 +874,4 @@ { return preg_replace('/(\n|\r)+/', "\\1", $text); } -} \ No newline at end of file +} Index: core/units/email_templates/email_template_eh.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/email_templates/email_template_eh.php (revision 15916) +++ core/units/email_templates/email_template_eh.php (revision ) @@ -59,7 +59,7 @@ $module = $this->Application->GetVar('module'); if ( strlen($module) > 0 ) { - // checking permission when lising module email events in separate section + // checking permission when listing module email events in separate section $module = explode(':', $module, 2); if ( count($module) == 1 ) { \ No newline at end of file