Make WordPress Core


Ignore:
Timestamp:
04/05/2021 10:36:17 AM (4 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison in wp-admin/includes/class-wp-filesystem-*.php.

See #52627.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-filesystem-base.php

    r49936 r50657  
    275275
    276276        foreach ( $folder_parts as $index => $key ) {
    277             if ( $index == $last_index ) {
     277            if ( $index === $last_index ) {
    278278                continue; // We want this to be caught by the next code block.
    279279            }
     
    344344        $perms = intval( $this->getchmod( $file ), 8 );
    345345
    346         if ( ( $perms & 0xC000 ) == 0xC000 ) { // Socket.
     346        if ( ( $perms & 0xC000 ) === 0xC000 ) { // Socket.
    347347            $info = 's';
    348         } elseif ( ( $perms & 0xA000 ) == 0xA000 ) { // Symbolic Link.
     348        } elseif ( ( $perms & 0xA000 ) === 0xA000 ) { // Symbolic Link.
    349349            $info = 'l';
    350         } elseif ( ( $perms & 0x8000 ) == 0x8000 ) { // Regular.
     350        } elseif ( ( $perms & 0x8000 ) === 0x8000 ) { // Regular.
    351351            $info = '-';
    352         } elseif ( ( $perms & 0x6000 ) == 0x6000 ) { // Block special.
     352        } elseif ( ( $perms & 0x6000 ) === 0x6000 ) { // Block special.
    353353            $info = 'b';
    354         } elseif ( ( $perms & 0x4000 ) == 0x4000 ) { // Directory.
     354        } elseif ( ( $perms & 0x4000 ) === 0x4000 ) { // Directory.
    355355            $info = 'd';
    356         } elseif ( ( $perms & 0x2000 ) == 0x2000 ) { // Character special.
     356        } elseif ( ( $perms & 0x2000 ) === 0x2000 ) { // Character special.
    357357            $info = 'c';
    358         } elseif ( ( $perms & 0x1000 ) == 0x1000 ) { // FIFO pipe.
     358        } elseif ( ( $perms & 0x1000 ) === 0x1000 ) { // FIFO pipe.
    359359            $info = 'p';
    360360        } else { // Unknown.
Note: See TracChangeset for help on using the changeset viewer.