[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 13:38:18 UTC 2020


#48785: REST API: WP_REST_Controller::get_public_item_schema() assumes that the
schema has properties.
-------------------------------------------------+-------------------------
 Reporter:  pento                                |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  5.4
Component:  REST API                             |     Version:  4.7
 Severity:  normal                               |  Resolution:
 Keywords:  good-first-bug has-patch has-unit-   |     Focuses:
  tests commit                                   |
-------------------------------------------------+-------------------------

Comment (by birgire):

 Replying to [comment:17 TimothyBlynJacobs]:
 > That’s a good point @birgire, do you want to add an updated patch?

 Sure, thanks, [attachment:"48785.5.diff"] uses

 {{{
 assertArrayHasKey
 assertArrayNotHasKey

 }}}

 and also:

 {{{

 assertEqualSetsWithIndex
 }}}

 It also removes {{{__()}}} function dependency.

 And adds {{{@since 5.4.0}}} in the new test class file.

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


More information about the wp-trac mailing list