Skip to content

Commit

Permalink
Coding Standards: Remove extra unset() in `rest_handle_options_requ…
Browse files Browse the repository at this point in the history
…est()`.

`$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
  • Loading branch information
SergeyBiryukov committed Nov 24, 2024
1 parent 2d9937a commit e80aa00
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/wp-includes/rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
Expand Down

0 comments on commit e80aa00

Please sign in to comment.