[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
Sun Nov 17 23:24:37 UTC 2019


#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:  critical        |   Keywords:  needs-patch
  Focuses:                  |
----------------------------+-----------------------------
 I updated several websites to WP 5.3 without any problems. But on one
 wesite I got these PHP warnings both in the backend and in the website:
 {{{
 Warning: ftp_nlist() expects parameter 1 to be resource, null given in
 /wp-admin/includes/class-wp-filesystem-ftpext.php on line 402
 Warning: ftp_pwd() expects parameter 1 to be resource, null given in /wp-
 admin/includes/class-wp-filesystem-ftpext.php on line 226
 Warning: ftp_pwd() expects parameter 1 to be resource, null given in /wp-
 admin/includes/class-wp-filesystem-ftpext.php on line 226
 Warning: ftp_pwd() expects parameter 1 to be resource, null given in /wp-
 admin/includes/class-wp-filesystem-ftpext.php on line 226
 Warning: ftp_nlist() expects parameter 1 to be resource, null given in
 /wp-admin/includes/class-wp-filesystem-ftpext.php on line 402
 Warning: ftp_pwd() expects parameter 1 to be resource, null given in /wp-
 admin/includes/class-wp-filesystem-ftpext.php on line 226
 Warning: ftp_pwd() expects parameter 1 to be resource, null given in /wp-
 admin/includes/class-wp-filesystem-ftpext.php on line 226
 Warning: ftp_pwd() expects parameter 1 to be resource, null given in /wp-
 admin/includes/class-wp-filesystem-ftpext.php on line 681
 Warning: ftp_pwd() expects parameter 1 to be resource, null given in /wp-
 admin/includes/class-wp-filesystem-ftpext.php on line 226
 Warning: ftp_pwd() expects parameter 1 to be resource, null given in /wp-
 admin/includes/class-wp-filesystem-ftpext.php on line 226

 Warning: Cannot modify header information - headers already sent by
 (output started at /wp-admin/includes/class-wp-filesystem-ftpext.php:402)
 in /wp-includes/functions.php on line 5946
 Warning: Cannot modify header information - headers already sent by
 (output started at /wp-admin/includes/class-wp-filesystem-ftpext.php:402)
 in /wp-admin/includes/misc.php on line 1252
 Warning: Cannot modify header information - headers already sent by
 (output started at /wp-admin/includes/class-wp-filesystem-ftpext.php:402)
 in /wp-admin/admin-header.php on line 9
 }}}

 I suppressed the ouput by "muting" the function calls with '@' in the file
 'class-wp-filesystem-ftpext.php', i.e. changed {{{ftp_nlist()}}} to
 {{{@ftp_nlist()}}} etc..

 I will be glad if any reason can be found and fixed until the next WP
 upgrade.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48689>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list