[wp-trac] [WordPress Trac] #48689: PHP warnings after updating to WP 5.3: ftp_nlist() and ftp_pwd() expect missing parameters
WordPress Trac
noreply at wordpress.org
Sat Jan 11 17:34:43 UTC 2020
#48689: PHP warnings after updating to WP 5.3: ftp_nlist() and ftp_pwd() expect
missing parameters
----------------------------+------------------------------
Reporter: Hinjiriyo | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Filesystem API | Version: 5.3
Severity: minor | Resolution:
Keywords: needs-patch | Focuses:
----------------------------+------------------------------
Comment (by erikgeurtsplatformiqcom):
This changeset https://core.trac.wordpress.org/changeset/45611/trunk/src
/wp-admin/includes/class-wp-filesystem-ftpext.php (for example in line
226) unearths these PHP warnings by removing the @ symbol. It means the
warning is no longer suppressed, but it's been an issue before this
change.
In my case, it was also the addition of a plugin, but not the same as the
previous comments, that brought out the warnings. The cause is not in
these plugins directly, but in the fact that certain plugins in certain
environments make an attempt to use the WP filesystem in a way that
apparently is not expected.
The actual issue in https://core.trac.wordpress.org/browser/trunk/src/wp-
admin/includes/class-wp-filesystem-ftpext.php?rev=45611 since that change
in July 2019 is that $this->link doesn't get a value assigned first, so
any attempt to use the variable in this code throws the warning.
It seems that the if statement in
https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/class-
wp-filesystem-ftpext.php?rev=45611#L86 is where things go wrong.
In my case, the problem may come from the fact that I'm used to defining
the FTP hostname, user and password in the wp-config.php, yet doing this
incorrectly or with something missing. So in fact this may be a
documentation issue (i.e. not having followed the documentation to the
letter).
Where can the documentation for defining the FTP credentials in the wp-
config.php be found?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48689#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list