diff --git a/wp-admin/includes/class-wp-filesystem-ftpext.php b/wp-admin/includes/class-wp-filesystem-ftpext.php index 056e7ecd9c..c3bb635809 100644 --- a/wp-admin/includes/class-wp-filesystem-ftpext.php +++ b/wp-admin/includes/class-wp-filesystem-ftpext.php @@ -510,14 +510,14 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { * Gets the file size (in bytes). * * @since 2.5.0 - * @since 6.1.0 Corrected the return value: while WP_Filesystem_Base::size() - * is documented to return false on failure, ftp_size() returns -1. * * @param string $file Path to file. - * @return int Size of the file in bytes on success, -1 on failure. + * @return int|false Size of the file in bytes on success, false on failure. */ public function size( $file ) { - return ftp_size( $this->link, $file ); + $size = ftp_size( $this->link, $file ); + + return ( $size > -1 ) ? $size : false; } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 533ebf6e50..aa05fc9e50 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-53897'; +$wp_version = '6.1-alpha-53898'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.