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

Ryan Boren ryan at boren.nu
Thu Dec 4 21:48:39 GMT 2008


On Thu, Dec 4, 2008 at 12:15 AM, Admin <admin at activeblogging.com> wrote:
> ==============
> 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.

http://trac.wordpress.org/changeset/10048

Thanks.


More information about the wp-testers mailing list