Coding Standards: Use strict comparison in wp-admin/includes/class-wp-filesystem-*.php.
See #52627. Built from https://develop.svn.wordpress.org/trunk@50657 git-svn-id: http://core.svn.wordpress.org/trunk@50269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user