Make WordPress Core

Changeset 50652


Ignore:
Timestamp:
04/04/2021 04:47:48 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison in wp-admin/includes/class-core-upgrader.php.

See #52627.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-core-upgrader.php

    r50082 r50652  
    105105                if ( $parsed_args['do_rollback'] && $current->packages->rollback ) {
    106106                        $to_download = 'rollback';
    107                 } elseif ( $current->packages->partial && 'reinstall' !== $current->response && $wp_version == $current->partial_version && $partial ) {
     107                } elseif ( $current->packages->partial && 'reinstall' !== $current->response && $wp_version === $current->partial_version && $partial ) {
    108108                        $to_download = 'partial';
    109109                } elseif ( $current->packages->new_bundled && version_compare( $wp_version, $current->new_bundled, '<' )
     
    307307
    308308                // 1: If we're already on that version, not much point in updating?
    309                 if ( $offered_ver == $wp_version ) {
     309                if ( $offered_ver === $wp_version ) {
    310310                        return false;
    311311                }
     
    324324
    325325                        // Don't claim we can update on update-core.php if we have a non-critical failure logged.
    326                         if ( $wp_version == $failure_data['current'] && false !== strpos( $offered_ver, '.1.next.minor' ) ) {
     326                        if ( $wp_version === $failure_data['current'] && false !== strpos( $offered_ver, '.1.next.minor' ) ) {
    327327                                return false;
    328328                        }
     
    333333                         * 3.7.1 => 3.7.2 resulted in files_not_writable, if we are still on 3.7.1 and still trying to update to 3.7.2.
    334334                         */
    335                         if ( empty( $failure_data['retry'] ) && $wp_version == $failure_data['current'] && $offered_ver == $failure_data['attempted'] ) {
     335                        if ( empty( $failure_data['retry'] ) && $wp_version === $failure_data['current'] && $offered_ver === $failure_data['attempted'] ) {
    336336                                return false;
    337337                        }
     
    356356
    357357                // 4: Minor in-branch updates (3.7.0 -> 3.7.1 -> 3.7.2 -> 3.7.4).
    358                 if ( $current_branch == $new_branch ) {
     358                if ( $current_branch === $new_branch ) {
    359359
    360360                        /**
Note: See TracChangeset for help on using the changeset viewer.