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

WordPress Trac noreply at wordpress.org
Tue Sep 15 22:29:36 UTC 2015


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

 * keywords:  needs-patch => has-patch
 * milestone:  Future Release => 4.4


Comment:

 [attachment:27571.diff 27571.diff] implements `__get()` and `__isset()` on
 `WP_Comment` to allow `WP_Comment_Query` to just return fields from
 `$wpdb->comments` (if `'fields'` is set to `'*'`) and then magically get
 `$post` properties if the comment has `comment_post_ID > 0` and doesn't
 already have the property on itself.

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


More information about the wp-trac mailing list