Make WordPress Core


Ignore:
Timestamp:
06/12/2015 05:47:16 PM (9 years ago)
Author:
wonderboymusic
Message:

$status shouldn't be loosely compared to true in wp_xmlrpc_server::wp_deleteComment().
$initial shouldn't be loosely compared to true in get_calendar().
current_user_can() shouldn't be loosely compared to false in kses_init()
$get_all shouldn't be loosely compared to true in get_blog_details().
is_array() and in_array() shouldn't be loosely compared in wpmu_validate_user_signup().
$result should by strictly compared in check_ajax_referer().
wp_verify_nonce() should by strictly compared in _show_post_preview().
is_user_logged_in() should not be loosly compared against false in wp-signup.php.

See #32444.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ms-functions.php

    r32718 r32733  
    482482
    483483    $illegal_names = get_site_option( 'illegal_names' );
    484     if ( is_array( $illegal_names ) == false ) {
     484    if ( ! is_array( $illegal_names ) ) {
    485485        $illegal_names = array(  'www', 'web', 'root', 'admin', 'main', 'invite', 'administrator' );
    486486        add_site_option( 'illegal_names', $illegal_names );
    487487    }
    488     if ( in_array( $user_name, $illegal_names ) == true )
     488    if ( in_array( $user_name, $illegal_names ) )
    489489        $errors->add('user_name',  __( 'That username is not allowed.' ) );
    490490
     
    506506
    507507    $limited_email_domains = get_site_option( 'limited_email_domains' );
    508     if ( is_array( $limited_email_domains ) && empty( $limited_email_domains ) == false ) {
     508    if ( is_array( $limited_email_domains ) && ! empty( $limited_email_domains ) ) {
    509509        $emaildomain = substr( $user_email, 1 + strpos( $user_email, '@' ) );
    510         if ( in_array( $emaildomain, $limited_email_domains ) == false )
     510        if ( ! in_array( $emaildomain, $limited_email_domains ) ) {
    511511            $errors->add('user_email', __('Sorry, that email address is not allowed!'));
     512        }
    512513    }
    513514
     
    628629        $errors->add('blogname', __( 'Only lowercase letters (a-z) and numbers are allowed.' ) );
    629630
    630     if ( in_array( $blogname, $illegal_names ) == true )
     631    if ( in_array( $blogname, $illegal_names ) )
    631632        $errors->add('blogname',  __( 'That name is not allowed.' ) );
    632633
     
    674675
    675676    if ( username_exists( $blogname ) ) {
    676         if ( is_object( $user ) == false || ( is_object($user) && ( $user->user_login != $blogname ) ) )
     677        if ( ! is_object( $user ) || ( is_object($user) && ( $user->user_login != $blogname ) ) )
    677678            $errors->add( 'blogname', __( 'Sorry, that site is reserved!' ) );
    678679    }
     
    16901691        return $dirsize[ $directory ][ 'size' ];
    16911692
    1692     if ( false == is_array( $dirsize ) )
     1693    if ( ! is_array( $dirsize ) )
    16931694        $dirsize = array();
    16941695
Note: See TracChangeset for help on using the changeset viewer.