[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 21:56:42 UTC 2010
#12232: Invalid Archive. Theme Install Failed. Caused by ftp_rawlist using -a
option
-----------------------------+----------------------------------------------
Reporter: frankindelicato | Owner: dd32
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 3.0
Component: General | Version: 2.9.1
Severity: blocker | Keywords: ftp_rawlist
-----------------------------+----------------------------------------------
Comment(by frankindelicato):
I am not sure as I am new to wordpress but the hidden directories were not
being used anyway. After the rawlist call dirlist() builds an array to
return to its caller and when it builds the array it ignores the hidden
files. See below:
$dirlist = array();
foreach ( $list as $k => $v ) {
$entry = $this->parselisting($v);
if ( empty($entry) )
continue;
if ( '.' == $entry['name'] || '..' ==
$entry['name'] ) // THIS SKIPS THE HIDDEN FILES
continue;
if ( ! $include_hidden && '.' == $entry['name'][0]
)
continue;
if ( $limit_file && $entry['name'] != $limit_file)
continue;
$dirlist[ $entry['name'] ] = $entry;
}
So, in addition to fixing up the problem with returning nothing, (actually
dirlist() returns a boolean false instead of an empty array and this
causes a PHP Warning to be issued when the boolean is used by a following
array_keys call that is trying to use what it thinks is a returned array)
I guess you would have to test for how the hidden files are used when
people want to overwrite with a SVN checkout. I need to study PHP and
Wordpress more so if you like (and I have the Mac) I can pursue the
issues. You would have to point me in the right direction though as I do
not have the SVN stuff setup yet (pointing me to some SVN knowledge would
help) and another other suggestions you may have...
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12232#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list