[wp-trac] [WordPress Trac] #51170: FTP automatic updates are not RFC 959 compliant for NLST command
WordPress Trac
noreply at wordpress.org
Tue Aug 16 13:40:15 UTC 2022
#51170: FTP automatic updates are not RFC 959 compliant for NLST command
----------------------------+-----------------------
Reporter: giox069 | Owner: audrasjb
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.1
Component: Filesystem API | Version: 3.7
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses:
----------------------------+-----------------------
Changes (by SergeyBiryukov):
* status: reopened => closed
* resolution: => fixed
Comment:
In [changeset:"53898" 53898]:
{{{
#!CommitTicketReference repository="" revision="53898"
Upgrade/Install: Make `WP_Filesystem_FTPext::size()` return `false` on
failure.
While `WP_Filesystem_Base::size()` is documented to return `false` on
failure, `ftp_size()` returns -1, and the method documentation was
recently updated to reflect that.
This commit restores the previous `@return` tag and corrects the actual
return value instead, to bring consistency with all the other
`WP_Filesystem_*::size()` methods:
* `WP_Filesystem_Base::size()`
* `WP_Filesystem_Direct::size()`
* `WP_Filesystem_ftpsockets::size()`
* `WP_Filesystem_SSH2::size()`
{{{
@return int|false Size of the file in bytes on success, false on failure.
}}}
This better matches the purpose of the API to provide a consistent
interface for various filesystem implementations.
Follow-up to [6779], [30678], [45226], [53860], [53862].
Fixes #51170.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51170#comment:61>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list