WordPress.org

Make WordPress Core

Ticket #38873: 38873.diff

File 38873.diff, 471 bytes (added by joehoyle, 4 years ago)
  • src/wp-includes/rest-api.php

    diff --git a/src/wp-includes/rest-api.php b/src/wp-includes/rest-api.php
    index ffc6919..3d0b7ee 100644
    a b function rest_api_loaded() { 
    256256        $server = rest_get_server();
    257257
    258258        // Fire off the request.
    259         $server->serve_request( $GLOBALS['wp']->query_vars['rest_route'] );
     259        $server->serve_request( untrailingslashit( $GLOBALS['wp']->query_vars['rest_route'] ) );
    260260
    261261        // We're done.
    262262        die();