From dab5a13a31e8f8552722586a10e73e4c07f55bc1 Mon Sep 17 00:00:00 2001 From: Dovid Levine Date: Tue, 19 Nov 2024 10:21:11 +0200 Subject: [PATCH] chore: remove extraneous `unset()` in `rest_handle_options_request`. `$args` is defined in the immediate-preceding codeblock, and only contains non-integer keys, so there is nothing to unset. --- src/wp-includes/rest-api.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/wp-includes/rest-api.php b/src/wp-includes/rest-api.php index 242b317ca1fc7..401a3b9f1725a 100644 --- a/src/wp-includes/rest-api.php +++ b/src/wp-includes/rest-api.php @@ -818,9 +818,6 @@ function rest_handle_options_request( $response, $handler, $request ) { } foreach ( $endpoints as $endpoint ) { - // Remove the redundant preg_match() argument. - unset( $args[0] ); - $request->set_url_params( $args ); $request->set_attributes( $endpoint ); }