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.

git-svn-id: https://develop.svn.wordpress.org/trunk@56645 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2023-09-21 12:17:42 +00:00
parent aa033cba5c
commit ecaef7c4f7

View File

@ -1079,7 +1079,6 @@ class WP_REST_Server {
foreach ( $handlers as $handler ) {
$callback = $handler['callback'];
$response = null;
// Fallback to GET method if no HEAD method is registered.
$checked_method = $method;