[wp-trac] [WordPress Trac] #34896: Prevent unnecessary $wpdb->update() when hierarchical post doesn't have children

WordPress Trac noreply at wordpress.org
Mon Dec 7 16:55:15 UTC 2015


#34896: Prevent unnecessary $wpdb->update() when hierarchical post doesn't have
children
--------------------------------------+------------------
 Reporter:  danielbachhuber           |       Owner:
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  4.5
Component:  Posts, Post Types         |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------

Comment (by joehoyle):

 Looks good, as noted in Slack, the `count` I think is superfluous,
 checking the result from `get_results` is falsy should be nice.

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


More information about the wp-trac mailing list