[wp-trac] [WordPress Trac] #42069: Saving metadata fails (randomly) if equal value already exists
WordPress Trac
noreply at wordpress.org
Fri Oct 12 04:43:46 UTC 2018
#42069: Saving metadata fails (randomly) if equal value already exists
-------------------------------------------------+-------------------------
Reporter: JVel | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.0
Component: REST API | Version: 4.8.2
Severity: normal | Resolution:
Keywords: has-patch needs-testing has-unit- | Focuses: rest-api
tests |
-------------------------------------------------+-------------------------
Comment (by TimothyBlynJacobs):
I made a couple of changes.
1. Metadata has subtypes now, so we need to take this into account when
sanitizing.
2. We weren't handling the slashing of meta key consistently. It needs to
be slashed when updating meta, but unslashed for all the other functions.
Because of this I changed the code to keep the unslashed versions around
instead of continually unslashing them and then slashed as the values went
into `update_metadata()`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42069#comment:26>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list