[wp-testers] Re: auto upgrading and fopen()

Admin admin at activeblogging.com
Thu Dec 4 08:15:30 GMT 2008


==============
I had another fopen() incidence - when trying out the auto upgrade 
the file was consistently erroring out:

 >Downloading update from 
http://wordpress.org/nightly-builds/wordpress-latest.zip
 >Unpacking the core update
 >Incompatible archive: PCLZIP_ERR_BAD_FORMAT (-10) : Invalid archive structure
 >Installation Failed

I debugged, and it was because my system defaulted to text mode on 
fopen - resulting in 1,815k vs 1,808k for the zip file.

I changed line 440@/wp-admin/includes/file.php from

$handle = @fopen($tmpfname, 'w');

to

$handle = @fopen($tmpfname, 'wb');

and it downloaded the .zip correctly.
==============



More information about the wp-testers mailing list