Changeset 47054
- Timestamp:
- 01/09/2020 12:53:29 AM (5 years ago)
- Location:
- trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-activate.php
r45932 r47054 38 38 $redirect_url = remove_query_arg( 'key' ); 39 39 40 if ( $redirect_url !== remove_query_arg( false )) {40 if ( remove_query_arg( false ) !== $redirect_url ) { 41 41 setcookie( $activate_cookie, $key, 0, $activate_path, COOKIE_DOMAIN, is_ssl(), true ); 42 42 wp_safe_redirect( $redirect_url ); … … 47 47 } 48 48 49 if ( $result === null&& isset( $_COOKIE[ $activate_cookie ] ) ) {49 if ( null === $result && isset( $_COOKIE[ $activate_cookie ] ) ) { 50 50 $key = $_COOKIE[ $activate_cookie ]; 51 51 $result = wpmu_activate_signup( $key ); … … 53 53 } 54 54 55 if ( $result === null|| ( is_wp_error( $result ) && 'invalid_key' === $result->get_error_code() ) ) {55 if ( null === $result || ( is_wp_error( $result ) && 'invalid_key' === $result->get_error_code() ) ) { 56 56 status_header( 404 ); 57 57 } elseif ( is_wp_error( $result ) ) { … … 143 143 <?php 144 144 echo '<p class="lead-in">'; 145 if ( $signup->domain . $signup->path == '') {145 if ( '' === $signup->domain . $signup->path ) { 146 146 printf( 147 147 /* translators: 1: Login URL, 2: Username, 3: User email address, 4: Lost password URL. */ … … 163 163 } 164 164 echo '</p>'; 165 } elseif ( $result === null|| is_wp_error( $result ) ) {165 } elseif ( null === $result || is_wp_error( $result ) ) { 166 166 ?> 167 167 <h2><?php _e( 'An error occurred during the activation' ); ?></h2> … … 182 182 183 183 <?php 184 if ( $url && $url != network_home_url( '', 'http' )) :184 if ( $url && network_home_url( '', 'http' ) !== $url ) : 185 185 switch_to_blog( (int) $result['blog_id'] ); 186 186 $login_url = wp_login_url(); -
trunk/src/wp-cron.php
r46733 r47054 106 106 * must match $doing_wp_cron (the "key"). 107 107 */ 108 if ( $doing_cron_transient != $doing_wp_cron ) {108 if ( $doing_cron_transient !== $doing_wp_cron ) { 109 109 return; 110 110 } … … 139 139 140 140 // If the hook ran too long and another cron process stole the lock, quit. 141 if ( _get_cron_lock() != $doing_wp_cron ) {141 if ( _get_cron_lock() !== $doing_wp_cron ) { 142 142 return; 143 143 } … … 146 146 } 147 147 148 if ( _get_cron_lock() == $doing_wp_cron ) {148 if ( _get_cron_lock() === $doing_wp_cron ) { 149 149 delete_transient( 'doing_cron' ); 150 150 } -
trunk/src/wp-links-opml.php
r47033 r47054 83 83 <outline text="<?php echo esc_attr( $title ); ?>" type="link" xmlUrl="<?php echo esc_attr( $bookmark->link_rss ); ?>" htmlUrl="<?php echo esc_attr( $bookmark->link_url ); ?>" updated=" 84 84 <?php 85 if ( '0000-00-00 00:00:00' != $bookmark->link_updated ) {85 if ( '0000-00-00 00:00:00' !== $bookmark->link_updated ) { 86 86 echo $bookmark->link_updated;} 87 87 ?> -
trunk/src/wp-login.php
r46838 r47054 524 524 setcookie( TEST_COOKIE, 'WP Cookie check', 0, COOKIEPATH, COOKIE_DOMAIN, $secure ); 525 525 526 if ( SITECOOKIEPATH != COOKIEPATH ) {526 if ( SITECOOKIEPATH !== COOKIEPATH ) { 527 527 setcookie( TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN, $secure ); 528 528 } … … 933 933 $errors = new WP_Error(); 934 934 935 if ( isset( $_POST['pass1'] ) && $_POST['pass1'] != $_POST['pass2'] ) {935 if ( isset( $_POST['pass1'] ) && $_POST['pass1'] !== $_POST['pass2'] ) { 936 936 $errors->add( 'password_reset_mismatch', __( 'The passwords do not match.' ) ); 937 937 } -
trunk/src/wp-mail.php
r45932 r47054 102 102 $content_transfer_encoding = $content_transfer_encoding[0]; 103 103 } 104 if ( ( $content_type == 'multipart/alternative' ) && ( false !== strpos( $line, 'boundary="' ) ) && ( ''== $boundary ) ) {104 if ( ( 'multipart/alternative' === $content_type ) && ( false !== strpos( $line, 'boundary="' ) ) && ( '' === $boundary ) ) { 105 105 $boundary = trim( $line ); 106 106 $boundary = explode( '"', $boundary ); … … 143 143 144 144 if ( preg_match( '/Date: /i', $line ) ) { // of the form '20 Mar 2002 20:32:37 +0100' 145 $ddate = str_replace( 'Date: ', '', trim( $line ) );146 $ddate = preg_replace( '!\s*\(.+\)\s*$!', '', $ddate ); // remove parenthesised timezone string if it exists, as this confuses strtotime147 $ddate_ U= strtotime( $ddate );148 $post_date = gmdate( 'Y-m-d H:i:s', $ddate_U+ $time_difference );149 $post_date_gmt = gmdate( 'Y-m-d H:i:s', $ddate_U);145 $ddate = str_replace( 'Date: ', '', trim( $line ) ); 146 $ddate = preg_replace( '!\s*\(.+\)\s*$!', '', $ddate ); // remove parenthesised timezone string if it exists, as this confuses strtotime 147 $ddate_timestamp = strtotime( $ddate ); 148 $post_date = gmdate( 'Y-m-d H:i:s', $ddate_timestamp + $time_difference ); 149 $post_date_gmt = gmdate( 'Y-m-d H:i:s', $ddate_timestamp ); 150 150 } 151 151 } … … 163 163 $subject = trim( $subject ); 164 164 165 if ( $content_type == 'multipart/alternative') {165 if ( 'multipart/alternative' === $content_type ) { 166 166 $content = explode( '--' . $boundary, $content ); 167 167 $content = $content[2]; … … 213 213 $post_title = xmlrpc_getposttitle( $content ); 214 214 215 if ( $post_title == '') {215 if ( '' === $post_title ) { 216 216 $post_title = $subject; 217 217 } -
trunk/src/wp-signup.php
r46696 r47054 190 190 $blog_public_on_checked = ''; 191 191 $blog_public_off_checked = ''; 192 if ( isset( $_POST['blog_public'] ) && '0' == $_POST['blog_public'] ) {192 if ( isset( $_POST['blog_public'] ) && '0' === $_POST['blog_public'] ) { 193 193 $blog_public_off_checked = 'checked="checked"'; 194 194 } else { … … 642 642 } 643 643 644 if ( 'blog' == $_POST['signup_for'] ) {644 if ( 'blog' === $_POST['signup_for'] ) { 645 645 signup_blog( $user_name, $user_email ); 646 646 return false;
Note: See TracChangeset
for help on using the changeset viewer.