[wp-trac] [WordPress Trac] #62163: WP_REST_Request::get_params() includes unregistered args including rest_route when not using pretty permalinks

WordPress Trac noreply at wordpress.org
Wed Jan 22 19:06:58 UTC 2025


#62163: WP_REST_Request::get_params() includes unregistered args including
rest_route when not using pretty permalinks
--------------------------------------+---------------------
 Reporter:  westonruter               |       Owner:  (none)
     Type:  defect (bug)              |      Status:  new
 Priority:  low                       |   Milestone:  6.8
Component:  REST API                  |     Version:  4.4
 Severity:  normal                    |  Resolution:
 Keywords:  good-first-bug has-patch  |     Focuses:
--------------------------------------+---------------------

Comment (by westonruter):

 If you do really want to get all of the query parameters then I think you
 should rather just use `$_GET`. It seems to me that
 `WP_REST_Request::get_params()` should be limited to just those passed to
 the REST API.

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


More information about the wp-trac mailing list