[wp-trac] [WordPress Trac] #22901: wp.getComments doesn't accept an array of statuses anymore.

WordPress Trac noreply at wordpress.org
Wed Dec 12 22:35:14 UTC 2012


#22901: wp.getComments doesn't accept an array of statuses anymore.
--------------------------+--------------------
 Reporter:  stuffmc       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.5.1
Component:  XML-RPC       |     Version:  3.5
 Severity:  major         |  Resolution:
 Keywords:                |
--------------------------+--------------------

Comment (by nacin):

 Interesting. So, this is actually a change in WP_Comment_Query.

 If you passed 'status' as an array — any array — prior to 3.5, you would
 have gotten comments that were "hold" (0) and "approve" (1). That's it.
 Even if you asked for something else.

 In 3.5, what now occurs is when you pass a 'status', we query for that
 status. Problem is, you're passing an array, which is getting cast to
 Array. So, comment_status = 'Array'. That doesn't work.

 This is due to the changes in #21101.

 If you stop requesting 'status', wp.getComments will again return hold and
 approve for you.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22901#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list