From c67b970348d7402d47b522c8ea721487a15fb3f0 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 24 Nov 2024 18:37:20 +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. Built from https://develop.svn.wordpress.org/trunk@59456 git-svn-id: http://core.svn.wordpress.org/trunk@58842 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/rest-api.php | 3 --- wp-includes/version.php | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/wp-includes/rest-api.php b/wp-includes/rest-api.php index 242b317ca1..401a3b9f17 100644 --- a/wp-includes/rest-api.php +++ b/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 ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 610c659390..81abd8f9d8 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8-alpha-59455'; +$wp_version = '6.8-alpha-59456'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.