From eb825b2b40f3825694bf6984dafe87bd1c2d2c92 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 25 May 2011 17:36:26 +0000 Subject: [PATCH] Remove duplicate IDs before passing comment post IDs to get_pending_comments_num() git-svn-id: http://svn.automattic.com/wordpress/trunk@18041 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-comments-list-table.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-admin/includes/class-wp-comments-list-table.php b/wp-admin/includes/class-wp-comments-list-table.php index b149348518..fd25129b67 100644 --- a/wp-admin/includes/class-wp-comments-list-table.php +++ b/wp-admin/includes/class-wp-comments-list-table.php @@ -110,6 +110,8 @@ class WP_Comments_List_Table extends WP_List_Table { $_comment_post_ids[] = $_c->comment_post_ID; } + $_comment_post_ids = array_unique( $_comment_post_ids ); + $this->pending_count = get_pending_comments_num( $_comment_post_ids ); $this->set_pagination_args( array(