diff --git a/wp-admin/includes/class-wp-filesystem-base.php b/wp-admin/includes/class-wp-filesystem-base.php index c7e030dc86..9925ee8a1c 100644 --- a/wp-admin/includes/class-wp-filesystem-base.php +++ b/wp-admin/includes/class-wp-filesystem-base.php @@ -274,7 +274,7 @@ class WP_Filesystem_Base { $files = $this->dirlist( $base ); foreach ( $folder_parts as $index => $key ) { - if ( $index == $last_index ) { + if ( $index === $last_index ) { continue; // We want this to be caught by the next code block. } @@ -343,19 +343,19 @@ class WP_Filesystem_Base { public function gethchmod( $file ) { $perms = intval( $this->getchmod( $file ), 8 ); - if ( ( $perms & 0xC000 ) == 0xC000 ) { // Socket. + if ( ( $perms & 0xC000 ) === 0xC000 ) { // Socket. $info = 's'; - } elseif ( ( $perms & 0xA000 ) == 0xA000 ) { // Symbolic Link. + } elseif ( ( $perms & 0xA000 ) === 0xA000 ) { // Symbolic Link. $info = 'l'; - } elseif ( ( $perms & 0x8000 ) == 0x8000 ) { // Regular. + } elseif ( ( $perms & 0x8000 ) === 0x8000 ) { // Regular. $info = '-'; - } elseif ( ( $perms & 0x6000 ) == 0x6000 ) { // Block special. + } elseif ( ( $perms & 0x6000 ) === 0x6000 ) { // Block special. $info = 'b'; - } elseif ( ( $perms & 0x4000 ) == 0x4000 ) { // Directory. + } elseif ( ( $perms & 0x4000 ) === 0x4000 ) { // Directory. $info = 'd'; - } elseif ( ( $perms & 0x2000 ) == 0x2000 ) { // Character special. + } elseif ( ( $perms & 0x2000 ) === 0x2000 ) { // Character special. $info = 'c'; - } elseif ( ( $perms & 0x1000 ) == 0x1000 ) { // FIFO pipe. + } elseif ( ( $perms & 0x1000 ) === 0x1000 ) { // FIFO pipe. $info = 'p'; } else { // Unknown. $info = 'u'; diff --git a/wp-admin/includes/class-wp-filesystem-direct.php b/wp-admin/includes/class-wp-filesystem-direct.php index 9d35db6e32..099d9814af 100644 --- a/wp-admin/includes/class-wp-filesystem-direct.php +++ b/wp-admin/includes/class-wp-filesystem-direct.php @@ -505,11 +505,11 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base { * @return bool True on success, false on failure. */ public function touch( $file, $time = 0, $atime = 0 ) { - if ( 0 == $time ) { + if ( 0 === $time ) { $time = time(); } - if ( 0 == $atime ) { + if ( 0 === $atime ) { $atime = time(); } @@ -630,7 +630,7 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base { continue; } - if ( $limit_file && $struc['name'] != $limit_file ) { + if ( $limit_file && $struc['name'] !== $limit_file ) { continue; } diff --git a/wp-admin/includes/class-wp-filesystem-ftpext.php b/wp-admin/includes/class-wp-filesystem-ftpext.php index 0a4683c699..e0ad1c2f53 100644 --- a/wp-admin/includes/class-wp-filesystem-ftpext.php +++ b/wp-admin/includes/class-wp-filesystem-ftpext.php @@ -450,7 +450,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { $cwd = $this->cwd(); $result = @ftp_chdir( $this->link, trailingslashit( $path ) ); - if ( $result && $path == $this->cwd() || $this->cwd() != $cwd ) { + if ( $result && $path === $this->cwd() || $this->cwd() !== $cwd ) { @ftp_chdir( $this->link, $cwd ); return true; } @@ -614,7 +614,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { $b['year'] = $lucifer[3]; $b['hour'] = $lucifer[4]; $b['minute'] = $lucifer[5]; - $b['time'] = mktime( $lucifer[4] + ( strcasecmp( $lucifer[6], 'PM' ) == 0 ? 12 : 0 ), $lucifer[5], 0, $lucifer[1], $lucifer[2], $lucifer[3] ); + $b['time'] = mktime( $lucifer[4] + ( strcasecmp( $lucifer[6], 'PM' ) === 0 ? 12 : 0 ), $lucifer[5], 0, $lucifer[1], $lucifer[2], $lucifer[3] ); $b['am/pm'] = $lucifer[6]; $b['name'] = $lucifer[8]; } elseif ( ! $is_windows ) { @@ -647,7 +647,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { $b['group'] = $lucifer[3]; $b['size'] = $lucifer[4]; - if ( 8 == $lcount ) { + if ( 8 === $lcount ) { sscanf( $lucifer[5], '%d-%d-%d', $b['year'], $b['month'], $b['day'] ); sscanf( $lucifer[6], '%d:%d', $b['hour'], $b['minute'] ); @@ -745,7 +745,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { continue; } - if ( $limit_file && $entry['name'] != $limit_file ) { + if ( $limit_file && $entry['name'] !== $limit_file ) { continue; } diff --git a/wp-admin/includes/class-wp-filesystem-ftpsockets.php b/wp-admin/includes/class-wp-filesystem-ftpsockets.php index b9e8c70b51..25b96f86fe 100644 --- a/wp-admin/includes/class-wp-filesystem-ftpsockets.php +++ b/wp-admin/includes/class-wp-filesystem-ftpsockets.php @@ -210,7 +210,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { $bytes_written = fwrite( $temphandle, $contents ); - if ( false === $bytes_written || strlen( $contents ) != $bytes_written ) { + if ( false === $bytes_written || strlen( $contents ) !== $bytes_written ) { fclose( $temphandle ); unlink( $tempfile ); @@ -650,7 +650,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { continue; } - if ( $limit_file && $struc['name'] != $limit_file ) { + if ( $limit_file && $struc['name'] !== $limit_file ) { continue; } diff --git a/wp-admin/includes/class-wp-filesystem-ssh2.php b/wp-admin/includes/class-wp-filesystem-ssh2.php index d91588d0ac..d23d1f828d 100644 --- a/wp-admin/includes/class-wp-filesystem-ssh2.php +++ b/wp-admin/includes/class-wp-filesystem-ssh2.php @@ -779,7 +779,7 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base { continue; } - if ( $limit_file && $struc['name'] != $limit_file ) { + if ( $limit_file && $struc['name'] !== $limit_file ) { continue; } diff --git a/wp-includes/version.php b/wp-includes/version.php index adb2ec858e..8106853e75 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.8-alpha-50654'; +$wp_version = '5.8-alpha-50657'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.