[wp-trac] [WordPress Trac] #52787: Empty array for non-single post meta breaks post save through REST API

WordPress Trac noreply at wordpress.org
Mon Mar 15 09:44:16 UTC 2021


#52787: Empty array for non-single post meta breaks post save through REST API
-------------------------------------------------+-------------------------
 Reporter:  BrechtVds                            |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  high                                 |   Milestone:  5.7.1
Component:  REST API                             |     Version:  5.7
 Severity:  major                                |  Resolution:
 Keywords:  good-first-bug has-patch has-unit-   |     Focuses:  rest-api
  tests                                          |
-------------------------------------------------+-------------------------
Changes (by goaroundagain):

 * keywords:  needs-patch good-first-bug => good-first-bug has-patch has-
     unit-tests


Comment:

 I patched the error by checking in
 `\WP_REST_Meta_Fields::delete_meta_value` if `get_metadata_raw` is `null`
 and then `return true`

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


More information about the wp-trac mailing list