[wp-trac] [WordPress Trac] #12232: Invalid Archive. Theme Install Failed. Caused by ftp_rawlist using -a option

WordPress Trac wp-trac at lists.automattic.com
Mon Feb 15 01:41:58 UTC 2010


#12232: Invalid Archive. Theme Install Failed. Caused by ftp_rawlist using -a
option
-----------------------------+----------------------------------------------
 Reporter:  frankindelicato  |       Owner:            
     Type:  defect (bug)     |      Status:  new       
 Priority:  normal           |   Milestone:  Unassigned
Component:  General          |     Version:            
 Severity:  blocker          |    Keywords:            
-----------------------------+----------------------------------------------
 Downloading any theme gives me this error:
 Unpacking the package.
 Installing the theme.
 Incompatible Archive
 Theme Install Failed.

 I am running Mac OS X 10.6 using both MAMP and Apple Servers. The problem
 was found in the Worpress-MU code but the error is also in Wordpress.

 The problem was traced to the  @ftp_rawlist call in the function dirlist()
 in the class file class-wp-filesystem-ftpext.php. The @ftp_rawlist call
 preforms an ftp LIST command and is supposed to return a listing of a
 directories contents, including any folders in the directory. It was
 returning a boolean false instead of an array of file/folder listings.

 It is fixed by removing the -a in the ftp_rawlist call.

 The old line of code reads:
 $list = @ftp_rawlist($this->link, '-a ' . $path, false);

 The new line of code should read:
 $list = @ftp_rawlist($this->link, $path, false);

 Removing the -a does not effect the functionality of the dirlist()
 function because a few lines further down in the code the "." and ".."
 files/folders are ignored anyway.

 The issue was discussed in the wordpress-mu forum, in the topic:
 href=http://mu.wordpress.org/forums/topic/16777

 This bug is also related to the ticket: #10060

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12232>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list