[wp-trac] [WordPress Trac] #27571: WP_Comment_Query::query() querying for too much data

WordPress Trac noreply at wordpress.org
Sat Sep 26 06:40:42 UTC 2015


#27571: WP_Comment_Query::query() querying for too much data
--------------------------+---------------------------
 Reporter:  mkilian       |       Owner:  boonebgorges
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  4.4
Component:  Comments      |     Version:  3.8.1
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:
--------------------------+---------------------------
Changes (by wonderboymusic):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"34583"]:
 {{{
 #!CommitTicketReference repository="" revision="34583"
 Comments: add `__get()` and `__set()` to `WP_Comment` to provide BC for
 plugins that are grabbing post properties from the comment object due to
 an (unintended?) side effect of `JOIN`ing with the posts table in
 `WP_Comment_Query`, see [17667]. `'fields'` used to default to `*`, so the
 `JOIN` would grab every field from both tables. #YOLO

 Since [34310], these properties no longer exist. We can lazy load them for
 plugins with the magic methods.

 Fixes #27571.
 }}}

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


More information about the wp-trac mailing list