[wp-trac] [WordPress Trac] #55307: After upgrading Debian, WordPress sites no longer update through FTP

WordPress Trac noreply at wordpress.org
Sun Mar 6 13:06:43 UTC 2022


#55307: After upgrading Debian, WordPress sites no longer update through FTP
-----------------------------+------------------------------
 Reporter:  zippy1970        |       Owner:  (none)
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Upgrade/Install  |     Version:  trunk
 Severity:  major            |  Resolution:
 Keywords:  needs-testing    |     Focuses:
-----------------------------+------------------------------

Comment (by zippy1970):

 In **class-wp-filesystem-ftpext.php** I replaced the ''exists()'' function
 with my own version (below) and the update succeeded without a hitch.

 {{{#!php
 <?php
         public function exists( $file ) {
           $retval = false;

           $list = ftp_nlist( $this->link, $file );
           if( ! empty( $list ) ) {
             // if ftp_nlist returns *something*, the file or directory
 exists, on any FTP server
             $retval = true;
           } else {
             // if ftp_nlist returns nothing, either the file/dir doesn't
 exist or it's a file and
             // the FTP server's NLST command doesn't support globbing
 (i.e. Pure-FTPD > v1.0.47)
             // Check if it'a file
             if( ftp_size( $this->link, $file ) >= 0 ) {
               $retval = true;
             }
           }
           return $retval;

         }

 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55307#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list