[wp-trac] [WordPress Trac] #45611: REST API: Attachment controller calls undefined parent method
WordPress Trac
noreply at wordpress.org
Thu Dec 13 04:24:08 UTC 2018
#45611: REST API: Attachment controller calls undefined parent method
--------------------------+-----------------------------
Reporter: dlh | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: 4.7
Severity: normal | Keywords: has-patch
Focuses: |
--------------------------+-----------------------------
`WP_REST_Attachments_Controller` contains a public
`validate_user_can_query_private_statuses()` method that ends with a call
to `parent::validate_user_can_query_private_statuses()`. However, the
parent method was removed in [39104].
It seems possibly unintentional that the method still exists at all in
`WP_REST_Attachments_Controller`; I don't see any uses of it in core.
The attached patch would update the method to pass to the parent
`sanitize_post_statuses()` method that was added in [39104]. (Perhaps
`validate_user_can_query_private_statuses()` should also be deprecated?)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45611>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list