REST API: Remove redundant "0" parameter.

This is just an artifact of how we parse the URL, and is already available
via $request->get_route()

Props danielbachhuber.
Fixes #34647.


git-svn-id: https://develop.svn.wordpress.org/trunk@35659 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan McCue
2015-11-18 07:23:38 +00:00
parent 7b12240b12
commit 52bdf9d6a5
2 changed files with 17 additions and 0 deletions
@@ -789,6 +789,8 @@ class WP_REST_Server {
}
if ( ! is_wp_error( $response ) ) {
// Remove the redundant preg_match argument.
unset( $args[0] );
$request->set_url_params( $args );
$request->set_attributes( $handler );