[wp-trac] [WordPress Trac] #48785: REST API: WP_REST_Controller::get_public_item_schema() assumes that the schema has properties.
WordPress Trac
noreply at wordpress.org
Thu Feb 20 16:56:31 UTC 2020
#48785: REST API: WP_REST_Controller::get_public_item_schema() assumes that the
schema has properties.
-------------------------------------------------+-------------------------
Reporter: pento | Owner:
| TimothyBlynJacobs
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 5.4
Component: REST API | Version: 4.7
Severity: normal | Resolution: fixed
Keywords: good-first-bug has-patch has-unit- | Focuses:
tests commit |
-------------------------------------------------+-------------------------
Changes (by TimothyBlynJacobs):
* owner: (none) => TimothyBlynJacobs
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"47328" 47328]:
{{{
#!CommitTicketReference repository="" revision="47328"
REST API: Don't assume all item schemas have properties.
All schema types, not just objects, are permitted as the base type of a
resource. A future patch could add validation support for those types, but
this fix only prevents a PHP warning from being issued.
Props dhavalkasvala, johnwatkins0, birgire.
Fixes #48785.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48785#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list