[wp-trac] [WordPress Trac] #42069: Saving metadata fails (randomly) if equal value already exists
WordPress Trac
noreply at wordpress.org
Thu Oct 11 22:15:21 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 dcavins):
Thanks @boonebgorges for taking another look at this.
Yes, the extra boolean similar-value tests were included because it
appears that meta registered with the `boolean` type is more permissive
than, say, meta registered with the `integer` type. (The `integer` type is
pretty permissive, though, because it will allow numeric strings.)
If a meta is set to `boolean`, it seems to be currently possible to pass
any boolean-ish value to it successfully, like `true`, `false`, `0`, `1`,
`"0"`, or `"1"` (or any other string, actually) without triggering the
mismatched-type 400 error.
The above comments are an aside from Boone's patch, which is the necessary
fix. The other tests I had included I agree should be removed because
they're requiring the API to cover for poor quality code.
Thanks everyone for your interest in this ticket!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42069#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list