Make WordPress Core

Changeset 56645

Timestamp:
09/21/2023 12:17:42 PM (11 months ago)
Author:
SergeyBiryukov
Message:

REST API: Remove unused variable in WP_REST_Server::match_request_to_handler().

Previously initialized in WP_REST_Server::dispatch(), the $response variable became unused when the logic was split into two new methods, ::match_request_to_handler() and ::respond_to_request().

Follow-up to [34928], [48947].

Props upadalavipul, mukesh27.
Fixes #59420.

File:
1 edited

Legend:

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

    r56566 r56645  
    10801080            foreach ( $handlers as $handler ) {
    10811081                $callback = $handler['callback'];
    1082                 $response = null;
    10831082
    10841083                // Fallback to GET method if no HEAD method is registered.
Note: See TracChangeset for help on using the changeset viewer.