[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
Fri Jun 13 10:10:20 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:  has-unit-tests needs-patch  |     Focuses:  rest-api
----------------------------------------+--------------------------

Comment (by sheldorofazeroth):

 @johnbillion @Mamaduka  I think it would be best if there is a small
 change to the code. Instead of using
 $request->get_params(); I can use $request->get_body_params(). This will
 only consider the POST request body and not the URL parameters. Let me
 know your thoughts on this. I'll make the change once I hear back from
 you.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/41604#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list