Skip to content

Commit

Permalink
REST API: Correct variable type in `WP_Rest_Server::serve_batch_reque…
Browse files Browse the repository at this point in the history
…st_v1()`.

`wp_parse_str()` expects an array as the second parameter.

Follow-up to [49252].

Props antonvlasenko.
See #61593.

git-svn-id: https://develop.svn.wordpress.org/trunk@58688 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Jul 8, 2024
1 parent b9e2bd9 commit baa8c7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wp-includes/rest-api/class-wp-rest-server.php
Original file line number Diff line number Diff line change
Expand Up @@ -1667,7 +1667,7 @@ public function serve_batch_request_v1( WP_REST_Request $batch_request ) {
$single_request = new WP_REST_Request( isset( $args['method'] ) ? $args['method'] : 'POST', $parsed_url['path'] );

if ( ! empty( $parsed_url['query'] ) ) {
$query_args = null; // Satisfy linter.
$query_args = array();
wp_parse_str( $parsed_url['query'], $query_args );
$single_request->set_query_params( $query_args );
}
Expand Down

0 comments on commit baa8c7f

Please sign in to comment.