From ecaef7c4f7d90d07ac4c70e25fe7590198f3522d Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 21 Sep 2023 12:17:42 +0000 Subject: [PATCH] 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 --- src/wp-includes/rest-api/class-wp-rest-server.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/wp-includes/rest-api/class-wp-rest-server.php b/src/wp-includes/rest-api/class-wp-rest-server.php index 50e7bd9796..ae7f0ee67e 100644 --- a/src/wp-includes/rest-api/class-wp-rest-server.php +++ b/src/wp-includes/rest-api/class-wp-rest-server.php @@ -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;