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
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user