WordPress.org

Make WordPress Core

Changeset 32730


Ignore:
Timestamp:
06/12/2015 05:18:38 PM (6 years ago)
Author:
wonderboymusic
Message:

Don't loosely compare functions that return bool against a literal bool.

See #32444.

Location:
trunk/src/wp-admin
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/export.php

    r32655 r32730  
    134134     */
    135135    function wxr_cdata( $str ) {
    136         if ( seems_utf8( $str ) == false )
     136        if ( ! seems_utf8( $str ) ) {
    137137            $str = utf8_encode( $str );
    138 
     138        }
    139139        // $str = ent2ncr(esc_html($str));
    140140        $str = '<![CDATA[' . str_replace( ']]>', ']]]]><![CDATA[>', $str ) . ']]>';
  • trunk/src/wp-admin/includes/menu.php

    r32655 r32730  
    183183foreach ( $menu as $id => $data ) {
    184184    if ( 0 == strcmp('wp-menu-separator', $data[4] ) ) {
    185         if (false == $separator_found) {
     185        if ( ! $separator_found ) {
    186186            $separator_found = true;
    187187        } else {
  • trunk/src/wp-admin/includes/ms.php

    r32653 r32730  
    454454 */
    455455function fix_import_form_size( $size ) {
    456     if ( upload_is_user_over_quota( false ) == true )
     456    if ( upload_is_user_over_quota( false ) ) {
    457457        return 0;
    458 
     458    }
    459459    $available = get_upload_space_available();
    460460    return min( $size, $available );
  • trunk/src/wp-admin/network/site-new.php

    r32328 r32730  
    7777        $password = wp_generate_password( 12, false );
    7878        $user_id = wpmu_create_user( $domain, $password, $email );
    79         if ( false == $user_id )
     79        if ( false === $user_id )
    8080            wp_die( __( 'There was an error creating the user.' ) );
    8181        else
  • trunk/src/wp-admin/network/site-users.php

    r32152 r32730  
    7171                $user_id = wpmu_create_user( esc_html( strtolower( $user['username'] ) ), $password, esc_html( $user['email'] ) );
    7272
    73                 if ( false == $user_id ) {
     73                if ( false === $user_id ) {
    7474                    $update = 'err_new_dup';
    7575                } else {
Note: See TracChangeset for help on using the changeset viewer.