[wp-trac] [WordPress Trac] #38417: Post status enum is ignored in collection params, allowing invalid values

WordPress Trac noreply at wordpress.org
Tue Oct 25 18:41:41 UTC 2016


#38417: Post status enum is ignored in collection params, allowing invalid values
--------------------------+-----------------------
 Reporter:  joehoyle      |       Owner:  joehoyle
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  4.7
Component:  REST API      |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  dev-feedback  |     Focuses:
--------------------------+-----------------------
Changes (by jeremyfelt):

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


Comment:

 Previously, if an invalid post status was assigned to a media object, the
 object would be returned with an unchanged status. Now, an error response
 is returned.

 The assertion in `test_get_items_invalid_status_param_is_discarded()`
 needs to be updated to account for the expected error response.

 [attachment:38417.diff] makes this change.

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


More information about the wp-trac mailing list