REST API: remove unnecessary variable assignments in rest_handle_options_request().

See #37771.


git-svn-id: https://develop.svn.wordpress.org/trunk@38310 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2016-08-22 20:55:29 +00:00
parent 0dcc38a1ef
commit 368e28243f

View File

@ -421,10 +421,8 @@ function rest_handle_options_request( $response, $handler, $request ) {
$response = new WP_REST_Response();
$data = array();
$accept = array();
foreach ( $handler->get_routes() as $route => $endpoints ) {
$match = preg_match( '@^' . $route . '$@i', $request->get_route(), $args );
$match = preg_match( '@^' . $route . '$@i', $request->get_route() );
if ( ! $match ) {
continue;