[wp-trac] [WordPress Trac] #34977: When updating a Comment do not call `wp_update_comment_count` if there is no related Post

WordPress Trac noreply at wordpress.org
Fri Dec 11 16:23:08 UTC 2015


#34977: When updating a Comment do not call `wp_update_comment_count` if there is
no related Post
----------------------------------------+--------------------------
 Reporter:  rachelbaker                 |       Owner:  rachelbaker
     Type:  enhancement                 |      Status:  reviewing
 Priority:  normal                      |   Milestone:  4.5
Component:  Comments                    |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  good-first-bug needs-patch  |     Focuses:
----------------------------------------+--------------------------

Comment (by juanfra):

 @boonebgorges do you mean inside the `wp_update_comment_count()` function?

 {{{#!php

 $post_id = (int) $post_id;
 if ( ! $post_id ) {
         return false;
 }
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34977#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list