mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-08 17:38:26 +01:00
Coding Standards: Use strict comparison in wp-admin/includes/class-core-upgrader.php
.
See #52627. Built from https://develop.svn.wordpress.org/trunk@50652 git-svn-id: http://core.svn.wordpress.org/trunk@50264 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b70c00d6ac
commit
907bfe74cd
@ -104,7 +104,7 @@ class Core_Upgrader extends WP_Upgrader {
|
||||
*/
|
||||
if ( $parsed_args['do_rollback'] && $current->packages->rollback ) {
|
||||
$to_download = 'rollback';
|
||||
} elseif ( $current->packages->partial && 'reinstall' !== $current->response && $wp_version == $current->partial_version && $partial ) {
|
||||
} elseif ( $current->packages->partial && 'reinstall' !== $current->response && $wp_version === $current->partial_version && $partial ) {
|
||||
$to_download = 'partial';
|
||||
} elseif ( $current->packages->new_bundled && version_compare( $wp_version, $current->new_bundled, '<' )
|
||||
&& ( ! defined( 'CORE_UPGRADE_SKIP_NEW_BUNDLED' ) || ! CORE_UPGRADE_SKIP_NEW_BUNDLED ) ) {
|
||||
@ -306,7 +306,7 @@ class Core_Upgrader extends WP_Upgrader {
|
||||
}
|
||||
|
||||
// 1: If we're already on that version, not much point in updating?
|
||||
if ( $offered_ver == $wp_version ) {
|
||||
if ( $offered_ver === $wp_version ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -323,7 +323,7 @@ class Core_Upgrader extends WP_Upgrader {
|
||||
}
|
||||
|
||||
// Don't claim we can update on update-core.php if we have a non-critical failure logged.
|
||||
if ( $wp_version == $failure_data['current'] && false !== strpos( $offered_ver, '.1.next.minor' ) ) {
|
||||
if ( $wp_version === $failure_data['current'] && false !== strpos( $offered_ver, '.1.next.minor' ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -332,7 +332,7 @@ class Core_Upgrader extends WP_Upgrader {
|
||||
* Some non-critical failures do allow retries, like download_failed.
|
||||
* 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.
|
||||
*/
|
||||
if ( empty( $failure_data['retry'] ) && $wp_version == $failure_data['current'] && $offered_ver == $failure_data['attempted'] ) {
|
||||
if ( empty( $failure_data['retry'] ) && $wp_version === $failure_data['current'] && $offered_ver === $failure_data['attempted'] ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -355,7 +355,7 @@ class Core_Upgrader extends WP_Upgrader {
|
||||
}
|
||||
|
||||
// 4: Minor in-branch updates (3.7.0 -> 3.7.1 -> 3.7.2 -> 3.7.4).
|
||||
if ( $current_branch == $new_branch ) {
|
||||
if ( $current_branch === $new_branch ) {
|
||||
|
||||
/**
|
||||
* Filters whether to enable minor automatic core updates.
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.8-alpha-50651';
|
||||
$wp_version = '5.8-alpha-50652';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user