Ticket #51170: 51170.2.diff
| File 51170.2.diff, 896 bytes (added by , 4 years ago) |
|---|
-
src/wp-admin/includes/class-wp-filesystem-ftpext.php
510 510 * Gets the file size (in bytes). 511 511 * 512 512 * @since 2.5.0 513 * @since 6.1.0 Corrected the return value: while WP_Filesystem_Base::size()514 * is documented to return false on failure, ftp_size() returns -1.515 513 * 516 514 * @param string $file Path to file. 517 * @return int Size of the file in bytes on success, -1on failure.515 * @return int|false Size of the file in bytes on success, false on failure. 518 516 */ 519 517 public function size( $file ) { 520 return ftp_size( $this->link, $file ); 518 $size = ftp_size( $this->link, $file ); 519 520 return ( $size > -1 ) ? $size : false; 521 521 } 522 522 523 523 /**