diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php index a84f0a70b9..7dafa1eaef 100644 --- a/src/wp-includes/comment.php +++ b/src/wp-includes/comment.php @@ -2010,6 +2010,10 @@ function wp_defer_comment_counting($defer=null) { function wp_update_comment_count($post_id, $do_deferred=false) { static $_deferred = array(); + if ( empty( $post_id ) && ! $do_deferred ) { + return false; + } + if ( $do_deferred ) { $_deferred = array_unique($_deferred); foreach ( $_deferred as $i => $_post_id ) {