Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#37187 closed defect (bug) (fixed)

Get rid of unnecessary property being set in `WP_Comment_Query`

Reported by: flixos90 Owned by: SergeyBiryukov
Priority: normal Milestone: 4.6
Component: Comments Version: 4.4
Severity: normal Keywords: has-patch commit
Cc: Focuses:

Description

WP_Comment_Query sets an unnecessary property $comment_count. It's not defined as a class member nor is it documented anywhere. It seems like it accidentally got there, maybe when parts of the code were copied from WP_Query (as this one actually has a $comment_count property which makes sense there).

Attachments (1)

37187.diff (544 bytes ) - added by flixos90 10 years ago.

Download all attachments as: .zip

Change History (5)

@flixos90
10 years ago

#1 @flixos90
10 years ago

  • Keywords has-patch added; needs-patch removed

37187.diff removes the line.

#2 @ocean90
10 years ago

  • Keywords commit added
  • Milestone Awaiting Review4.6

#3 @SergeyBiryukov
10 years ago

  • Owner set to SergeyBiryukov
  • Resolutionfixed
  • Status newclosed

In 37873:

Comments: Remove the assignment of an undocumented $comment_count property in WP_Comment_Query::get_comments(), which appears to be accidentally introduced in [34544].

Props flixos90.
Fixes #37187.

#4 @SergeyBiryukov
10 years ago

  • Version 3.14.4
Note: See TracTickets for help on using tickets.