WordPress/wp-includes/rest-api
Rachel Baker 4a37a04d0f 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.
Built from https://develop.svn.wordpress.org/trunk@38982


git-svn-id: http://core.svn.wordpress.org/trunk@38925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 16:08:45 +00:00
..
endpoints REST API: Return `WP_Error` when a client is attempting to update an option with a non-scalar value to `null`. 2016-10-27 16:08:45 +00:00
fields REST API: Introduce the Content API endpoints. 2016-10-20 02:55:32 +00:00
class-wp-rest-request.php REST API: Enable sanitize_callback to return WP_Error. 2016-09-14 15:50:29 +00:00
class-wp-rest-response.php DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:50:33 +00:00
class-wp-rest-server.php REST API: Deprecate the `rest_enabled` filter. 2016-10-26 06:28:30 +00:00