From ca5f76af171fb7200452238a7031df20904d4d9a Mon Sep 17 00:00:00 2001
From: filijonka <filijonka@597466.no-reply.drupal.org>
Date: Tue, 13 Mar 2012 15:19:20 +0100
Subject: [PATCH] corrected so drupal_renderdid get a rendered array and not
 an comment object

---
 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 e553087..ff6fe46 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -2591,8 +2591,10 @@ function comment_unpublish_action($comment, $context = array()) {
  * @see comment_unpublish_by_keyword_action_submit()
  */
 function comment_unpublish_by_keyword_action($comment, $context) {
+  $node = new stdClass();
+  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

