mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Coding Standards: Use strict type check for in_array() and array_search() where strings are involved.
This reduces the number of `WordPress.PHP.StrictInArray.MissingTrueStrict` issues from 486 to 50. Includes minor code layout fixes for better readability. See #49542. git-svn-id: https://develop.svn.wordpress.org/trunk@47550 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -577,7 +577,7 @@ class WP_Automatic_Updater {
|
||||
*/
|
||||
$send = true;
|
||||
$transient_failures = array( 'incompatible_archive', 'download_failed', 'insane_distro', 'locked' );
|
||||
if ( in_array( $error_code, $transient_failures ) && ! get_site_option( 'auto_core_update_failed' ) ) {
|
||||
if ( in_array( $error_code, $transient_failures, true ) && ! get_site_option( 'auto_core_update_failed' ) ) {
|
||||
wp_schedule_single_event( time() + HOUR_IN_SECONDS, 'wp_maybe_auto_update' );
|
||||
$send = false;
|
||||
}
|
||||
@@ -596,7 +596,7 @@ class WP_Automatic_Updater {
|
||||
'error_code' => $error_code,
|
||||
'error_data' => $result->get_error_data(),
|
||||
'timestamp' => time(),
|
||||
'retry' => in_array( $error_code, $transient_failures ),
|
||||
'retry' => in_array( $error_code, $transient_failures, true ),
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user