Make WordPress Core

Ticket #34772: class-wp-filesystem-ftpext.patch

File class-wp-filesystem-ftpext.patch, 822 bytes (added by ruud@…, 11 years ago)

Crude stab at a patch of some sort

  • htdocs/wp-admin/includes/class-wp-filesystem-ftpext.php

    ### Eclipse Workspace Patch 1.0
    #P ssv-portal.ruud.yams
     
    9898                $tempfile = wp_tempnam($file);
    9999                $temp = fopen($tempfile, 'w+');
    100100
    101                 if ( ! $temp )
     101                if ( ! $temp ) {
     102                        unlink($tempfile);
    102103                        return false;
    103 
    104                 if ( ! @ftp_fget($this->link, $temp, $file, FTP_BINARY ) )
     104                }
     105               
     106                if ( ! @ftp_fget($this->link, $temp, $file, FTP_BINARY ) ) {
     107                        fclose($temp);
     108                        unlink($tempfile);
    105109                        return false;
    106 
     110                }
     111               
    107112                fseek( $temp, 0 ); // Skip back to the start of the file being written to
    108113                $contents = '';
    109114