Skip to content

Commit e80aa00

Browse files
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
1 parent 2d9937a commit e80aa00

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/wp-includes/rest-api.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -818,9 +818,6 @@ function rest_handle_options_request( $response, $handler, $request ) {
818818
}
819819

820820
foreach ( $endpoints as $endpoint ) {
821-
// Remove the redundant preg_match() argument.
822-
unset( $args[0] );
823-
824821
$request->set_url_params( $args );
825822
$request->set_attributes( $endpoint );
826823
}

0 commit comments

Comments
 (0)