Make WordPress Core

Changeset 59456


Ignore:
Timestamp:
11/24/2024 06:35:44 PM (7 days ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api.php

    r59040 r59456  
    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 );
Note: See TracChangeset for help on using the changeset viewer.