[wp-trac] [WordPress Trac] #41604: REST API: Attempting to create or update a non-existent setting doesn't return an error response
WordPress Trac
noreply at wordpress.org
Thu Nov 27 13:21:45 UTC 2025
#41604: REST API: Attempting to create or update a non-existent setting doesn't
return an error response
------------------------------------------+--------------------------
Reporter: johnbillion | Owner: johnbillion
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 6.9
Component: Options, Meta APIs | Version:
Severity: normal | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses: rest-api
------------------------------------------+--------------------------
Changes (by johnbillion):
* keywords: has-patch has-unit-tests => needs-patch needs-unit-tests
Comment:
@swissspidy This is being treated as an "empty" request because the new
logic checks for validity by fetching all parameters that are not present
in the URL (`array_diff_key( $request->get_params(),
$request->get_query_params() )`).
Can we handle this as a valid request while also detecting an empty body?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41604#comment:34>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list