diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 4a73755..42a7f8f 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -2158,7 +2158,8 @@ function comment_submit($comment) {
     // 1) Filter it into HTML
     // 2) Strip out all HTML tags
     // 3) Convert entities back to plain-text.
-    $comment->subject = truncate_utf8(trim(decode_entities(strip_tags(check_markup($comment->comment_body[LANGUAGE_NONE][0]['value'], $comment->comment_body[LANGUAGE_NONE][0]['format'])))), 29, TRUE);
+    $comment_format = isset($comment->comment_body[LANGUAGE_NONE][0]['format']) ? $comment->comment_body[LANGUAGE_NONE][0]['format'] : NULL;
+    $comment->subject = truncate_utf8(trim(decode_entities(strip_tags(check_markup($comment->comment_body[LANGUAGE_NONE][0]['value'], $comment_format)))), 29, TRUE);
     // Edge cases where the comment body is populated only by HTML tags will
     // require a default subject.
     if ($comment->subject == '') {
