Opened 6 weeks ago
Last modified 16 hours ago
#63197 new defect (bug)
Sanity Checks in mkdir and delete for FTPext Filesystem
Reported by: | Owned by: | ||
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | major | Version: | trunk |
Component: | Filesystem API | Keywords: | needs-testing dev-feedback has-test-info has- |
Focuses: | Cc: |
Description
I've noted that during the process of Core updating with FTP ext with a specific legit FTP setup I've created using the wordpress-develop
+ some edits in the docker containerization system, the update was throwing a ton of errors and ultimately failing.
This is the final revision of a series of reports to solve this.
Here is the FTP setup
https://core.trac.wordpress.org/ticket/63172
This is also needed, because it sorts some big issues with exists
method in FTPext
https://core.trac.wordpress.org/ticket/63173
With these two es set-up and running, now we can proceed to test this.
Instructions to reproduce
- Set up a FTP. Ideally the root of the FTP should be / in the WP folder. For example, if you access your FTP with your credentials, your
wp-content
should be straight in/wp-content/
, not in something like/var/www/wp-content
or/home/youruser/website/wp-content/
- Set the
ftpext
FS_METHOD
- Set your credentials in
wp-config.php
minimally:
define( 'FS_METHOD', 'ftpext' ); define( 'FTP_USER', '.......' ); define( 'FTP_PASS', '.......' ); define( 'FTP_HOST', '......' );
- Run a core update and see all the errors.
Change History (2)

This ticket was mentioned in โPR #8618 on โWordPress/wordpress-develop by โ@SirLouen.
6 weeks ago #1
- Keywords has- added
Note: See TracTickets for help on using tickets.
This introduces two little little checks for file/dir existence, one in mkdir and one in rmdir.
Generally mkdir and delete/rmdir functions introduce an error control operator to filter out the
exists
checks that are generally implicit in both functions (both to check if already exist, or if the directory doesn't exist, respectively).This introduces two problems: This is against WordPress CS, and when debugging with
track_errors
enabled this is a pain in the stomach. For this reason, ideally the error control operator should avoided whenever possible and handle the special cases orderly. This said, the current state of functions were not even using this error control operator, so they were generating a ton of Warnings.Trac ticket: https://core.trac.wordpress.org/ticket/63197