WordPress.org

Make WordPress Core

Changeset 49668


Ignore:
Timestamp:
11/19/2020 12:03:11 PM (8 days ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Remove redundant isset() check in core_upgrade_preamble().

isset() can be safely used to check properties and subproperties of objects directly.

Follow-up to [49638].

See #51799.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/update-core.php

    r49638 r49668  
    233233    $updates    = get_core_updates();
    234234
    235     if ( isset( $updates[0] ) && isset( $updates[0]->version ) && version_compare( $updates[0]->version, $wp_version, '>' ) ) {
     235    if ( isset( $updates[0]->version ) && version_compare( $updates[0]->version, $wp_version, '>' ) ) {
    236236        echo '<h2 class="response">';
    237237        _e( 'An updated version of WordPress is available.' );
     
    259259    }
    260260    echo '</ul>';
     261
    261262    // Don't show the maintenance mode notice when we are only showing a single re-install option.
    262263    if ( $updates && ( count( $updates ) > 1 || 'latest' !== $updates[0]->response ) ) {
     
    271272        ) . '</p>';
    272273    }
     274
    273275    dismissed_updates();
    274276}
Note: See TracChangeset for help on using the changeset viewer.