From e80aa0038b80e06dbf4eb76c903925bb2e9f594d Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 24 Nov 2024 18:35:44 +0000 Subject: [PATCH] Coding Standards: Remove extra `unset()` in `rest_handle_options_request()`. `$args` is defined in the immediately preceding code block, and only contains non-integer keys, so there is never an `$args[0]` to unset. Follow-up to [44933]. Props justlevine. See #52217. git-svn-id: https://develop.svn.wordpress.org/trunk@59456 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 242b317ca1..401a3b9f17 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 ); }