WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/18/2015 07:23:38 AM (6 years ago)
Author:
rmccue
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/class-wp-rest-server.php

    r35653 r35659  
    790790
    791791                if ( ! is_wp_error( $response ) ) {
     792                    // Remove the redundant preg_match argument.
     793                    unset( $args[0] );
    792794
    793795                    $request->set_url_params( $args );
Note: See TracChangeset for help on using the changeset viewer.