From 657155ed7ce456c6e2b88df6643eabdeb96f284d Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@18041 602fd350-edb4-49c9-b593-d223f7449a82 --- 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(