[wp-trac] [WordPress Trac] #51389: REST API: WP_REST_Meta_Fields::default_additional_properties_to_false assumes that the schema has properties.

WordPress Trac noreply at wordpress.org
Sun Oct 25 20:29:05 UTC 2020


#51389: REST API: WP_REST_Meta_Fields::default_additional_properties_to_false
assumes that the schema has properties.
----------------------------------------+--------------------------------
 Reporter:  austin880625                |       Owner:  TimothyBlynJacobs
     Type:  defect (bug)                |      Status:  closed
 Priority:  normal                      |   Milestone:  5.6
Component:  REST API                    |     Version:  4.9
 Severity:  normal                      |  Resolution:  fixed
 Keywords:  good-first-bug needs-patch  |     Focuses:
----------------------------------------+--------------------------------
Changes (by TimothyBlynJacobs):

 * owner:  (none) => TimothyBlynJacobs
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"49308" 49308]:
 {{{
 #!CommitTicketReference repository="" revision="49308"
 REST API: Prevent PHP warning when metadata schema is missing properties.

 This switches to the new `rest_default_additional_properties_to_false()`
 function which doesn't have this issue and deprecates the
 `WP_REST_Meta_Fields::default_additional_properties_to_false()` method.

 Props austin880625.
 Fixes #51389.
 }}}

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


More information about the wp-trac mailing list