summaryrefslogtreecommitdiff
path: root/modules/comment/comment.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r--modules/comment/comment.module6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index d27f36d7d..b4f1971ec 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -200,7 +200,11 @@ function comment_post($edit) {
** one from the comment's body.
*/
- $edit["subject"] = strip_tags(($edit["subject"] ? $edit["subject"] : substr($edit["comment"], 0, 29)));
+ $edit["subject"] = strip_tags($edit["subject"]);
+
+ if ($edit["subject"] == "") {
+ $edit["subject"] = substr(strip_tags($edit["comment"]), 0, 29);
+ }
/*
** Validate the comment's body.