From 72b718a94c48263b3a4be8a0bf4331ff2f64890d Mon Sep 17 00:00:00 2001
From: filijonka <peter@letitrock.se>
Date: Sun, 4 Mar 2012 19:26:48 +0100
Subject: [PATCH] Issue #1461732: fixed that drupal_render didn't get a
 renderable array.

---
 modules/comment/comment.module |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index aa512a7..a312496 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -2588,8 +2588,10 @@ function comment_unpublish_action($comment, $context = array()) {
  * @see comment_unpublish_by_keyword_action_submit()
  */
 function comment_unpublish_by_keyword_action($comment, $context) {
+  $node = node_load($comment->nid);
+  comment_build_content($comment, $node);
+  $text = drupal_render($comment->content);
   foreach ($context['keywords'] as $keyword) {
-    $text = drupal_render($comment);
     if (strpos($text, $keyword) !== FALSE) {
       $comment->status = COMMENT_NOT_PUBLISHED;
       watchdog('action', 'Unpublished comment %subject.', array('%subject' => $comment->subject));
-- 
1.7.6.4

