[wp-trac] [WordPress Trac] #38527: Send an error if the client tries to delete an option with an non-scalar
WordPress Trac
noreply at wordpress.org
Thu Oct 27 16:07:08 UTC 2016
#38527: Send an error if the client tries to delete an option with an non-scalar
--------------------------+--------------------------
Reporter: rachelbaker | Owner: rachelbaker
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.7
Component: REST API | Version: trunk
Severity: normal | Resolution: fixed
Keywords: | Focuses:
--------------------------+--------------------------
Changes (by rachelbaker):
* owner: => rachelbaker
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"38982"]:
{{{
#!CommitTicketReference repository="" revision="38982"
REST API: Return `WP_Error` when a client is attempting to update an
option with a non-scalar value to `null`.
A `null` value is returned in the response for any option that has a non-
scalar value.
To protect clients from accidentally including the `null` values from a
response object in a request, we do not allow options with non-scalar
values to be updated to `null`. Without this added protection a client
could mistakenly delete all options that have non-scalar values from the
database.
Props joehoyle, rachelbaker.
Fixes #38527.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38527#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list