[wp-trac] [WordPress Trac] #49339: Issue when comparing old and new meta of type integer on update_multi_meta_value

WordPress Trac noreply at wordpress.org
Wed Jun 10 02:20:33 UTC 2020


#49339: Issue when comparing old and new meta of type integer on
update_multi_meta_value
---------------------------------------------+-----------------------------
 Reporter:  renathoc                         |       Owner:
                                             |  TimothyBlynJacobs
     Type:  defect (bug)                     |      Status:  closed
 Priority:  normal                           |   Milestone:  5.5
Component:  REST API                         |     Version:  4.7
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests commit  |     Focuses:  rest-api
---------------------------------------------+-----------------------------
Changes (by TimothyBlynJacobs):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"47943" 47943]:
 {{{
 #!CommitTicketReference repository="" revision="47943"
 REST API: Fix updating "multiple" meta keys with non-string values.

 Previously, the REST API would end up deleting each row of metadata and
 recreating it unnecessarily. This was caused by a type mismatch where the
 metadata API would always return a string value, and the REST API operated
 on a typed value.

 The REST API now applies the same sanitization and type casting for
 "multiple" meta keys and "single" meta keys.

 Fixes #49339.
 Props renathoc.
 }}}

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


More information about the wp-trac mailing list