diff --git a/wp-activate.php b/wp-activate.php index 7107352d53..0349f3fa37 100644 --- a/wp-activate.php +++ b/wp-activate.php @@ -37,7 +37,7 @@ if ( isset( $_GET['key'] ) && isset( $_POST['key'] ) && $_GET['key'] !== $_POST[ if ( $key ) { $redirect_url = remove_query_arg( 'key' ); - if ( $redirect_url !== remove_query_arg( false ) ) { + if ( remove_query_arg( false ) !== $redirect_url ) { setcookie( $activate_cookie, $key, 0, $activate_path, COOKIE_DOMAIN, is_ssl(), true ); wp_safe_redirect( $redirect_url ); exit; @@ -46,13 +46,13 @@ if ( $key ) { } } -if ( $result === null && isset( $_COOKIE[ $activate_cookie ] ) ) { +if ( null === $result && isset( $_COOKIE[ $activate_cookie ] ) ) { $key = $_COOKIE[ $activate_cookie ]; $result = wpmu_activate_signup( $key ); setcookie( $activate_cookie, ' ', time() - YEAR_IN_SECONDS, $activate_path, COOKIE_DOMAIN, is_ssl(), true ); } -if ( $result === null || ( is_wp_error( $result ) && 'invalid_key' === $result->get_error_code() ) ) { +if ( null === $result || ( is_wp_error( $result ) && 'invalid_key' === $result->get_error_code() ) ) { status_header( 404 ); } elseif ( is_wp_error( $result ) ) { $error_code = $result->get_error_code(); @@ -142,7 +142,7 @@ get_header( 'wp-activate' );

'; - if ( $signup->domain . $signup->path == '' ) { + if ( '' === $signup->domain . $signup->path ) { printf( /* translators: 1: Login URL, 2: Username, 3: User email address, 4: Lost password URL. */ __( 'Your account has been activated. You may now log in to the site using your chosen username of “%2$s”. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can reset your password.' ), @@ -162,7 +162,7 @@ get_header( 'wp-activate' ); ); } echo '

'; - } elseif ( $result === null || is_wp_error( $result ) ) { + } elseif ( null === $result || is_wp_error( $result ) ) { ?>

@@ -181,7 +181,7 @@ get_header( 'wp-activate' ); $cronhooks ) { do_action_ref_array( $hook, $v['args'] ); // If the hook ran too long and another cron process stole the lock, quit. - if ( _get_cron_lock() != $doing_wp_cron ) { + if ( _get_cron_lock() !== $doing_wp_cron ) { return; } } } } -if ( _get_cron_lock() == $doing_wp_cron ) { +if ( _get_cron_lock() === $doing_wp_cron ) { delete_transient( 'doing_cron' ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index b941b4fc51..fee0ed246b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.4-alpha-47053'; +$wp_version = '5.4-alpha-47054'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-links-opml.php b/wp-links-opml.php index 2bc214185d..c5b1729aea 100644 --- a/wp-links-opml.php +++ b/wp-links-opml.php @@ -82,7 +82,7 @@ foreach ( (array) $cats as $cat ) : ?> diff --git a/wp-login.php b/wp-login.php index f9f25fa3eb..51c8804bdb 100644 --- a/wp-login.php +++ b/wp-login.php @@ -523,7 +523,7 @@ if ( defined( 'RELOCATE' ) && RELOCATE ) { // Move flag is set $secure = ( 'https' === parse_url( wp_login_url(), PHP_URL_SCHEME ) ); setcookie( TEST_COOKIE, 'WP Cookie check', 0, COOKIEPATH, COOKIE_DOMAIN, $secure ); -if ( SITECOOKIEPATH != COOKIEPATH ) { +if ( SITECOOKIEPATH !== COOKIEPATH ) { setcookie( TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN, $secure ); } @@ -932,7 +932,7 @@ switch ( $action ) { $errors = new WP_Error(); - if ( isset( $_POST['pass1'] ) && $_POST['pass1'] != $_POST['pass2'] ) { + if ( isset( $_POST['pass1'] ) && $_POST['pass1'] !== $_POST['pass2'] ) { $errors->add( 'password_reset_mismatch', __( 'The passwords do not match.' ) ); } diff --git a/wp-mail.php b/wp-mail.php index 00a296bf3a..25d2e58bed 100644 --- a/wp-mail.php +++ b/wp-mail.php @@ -101,7 +101,7 @@ for ( $i = 1; $i <= $count; $i++ ) { $content_transfer_encoding = explode( ';', $content_transfer_encoding ); $content_transfer_encoding = $content_transfer_encoding[0]; } - if ( ( $content_type == 'multipart/alternative' ) && ( false !== strpos( $line, 'boundary="' ) ) && ( '' == $boundary ) ) { + if ( ( 'multipart/alternative' === $content_type ) && ( false !== strpos( $line, 'boundary="' ) ) && ( '' === $boundary ) ) { $boundary = trim( $line ); $boundary = explode( '"', $boundary ); $boundary = $boundary[1]; @@ -142,11 +142,11 @@ for ( $i = 1; $i <= $count; $i++ ) { } if ( preg_match( '/Date: /i', $line ) ) { // of the form '20 Mar 2002 20:32:37 +0100' - $ddate = str_replace( 'Date: ', '', trim( $line ) ); - $ddate = preg_replace( '!\s*\(.+\)\s*$!', '', $ddate ); // remove parenthesised timezone string if it exists, as this confuses strtotime - $ddate_U = strtotime( $ddate ); - $post_date = gmdate( 'Y-m-d H:i:s', $ddate_U + $time_difference ); - $post_date_gmt = gmdate( 'Y-m-d H:i:s', $ddate_U ); + $ddate = str_replace( 'Date: ', '', trim( $line ) ); + $ddate = preg_replace( '!\s*\(.+\)\s*$!', '', $ddate ); // remove parenthesised timezone string if it exists, as this confuses strtotime + $ddate_timestamp = strtotime( $ddate ); + $post_date = gmdate( 'Y-m-d H:i:s', $ddate_timestamp + $time_difference ); + $post_date_gmt = gmdate( 'Y-m-d H:i:s', $ddate_timestamp ); } } } @@ -162,7 +162,7 @@ for ( $i = 1; $i <= $count; $i++ ) { $subject = trim( $subject ); - if ( $content_type == 'multipart/alternative' ) { + if ( 'multipart/alternative' === $content_type ) { $content = explode( '--' . $boundary, $content ); $content = $content[2]; @@ -212,7 +212,7 @@ for ( $i = 1; $i <= $count; $i++ ) { $post_title = xmlrpc_getposttitle( $content ); - if ( $post_title == '' ) { + if ( '' === $post_title ) { $post_title = $subject; } diff --git a/wp-signup.php b/wp-signup.php index 22af182283..917b7d1267 100644 --- a/wp-signup.php +++ b/wp-signup.php @@ -189,7 +189,7 @@ function show_blog_form( $blogname = '', $blog_title = '', $errors = '' ) { $blog_public_on_checked = ''; $blog_public_off_checked = ''; - if ( isset( $_POST['blog_public'] ) && '0' == $_POST['blog_public'] ) { + if ( isset( $_POST['blog_public'] ) && '0' === $_POST['blog_public'] ) { $blog_public_off_checked = 'checked="checked"'; } else { $blog_public_on_checked = 'checked="checked"'; @@ -641,7 +641,7 @@ function validate_user_signup() { return false; } - if ( 'blog' == $_POST['signup_for'] ) { + if ( 'blog' === $_POST['signup_for'] ) { signup_blog( $user_name, $user_email ); return false; }