Changeset 7403

Show
Ignore:
Timestamp:
03/19/08 20:36:23 (4 months ago)
Author:
ryan
Message:

Check return of tmpfile(). see #5586

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/includes/class-wp-filesystem-ftpext.php

    r7393 r7403  
    153153        } 
    154154        $temp = tmpfile(); 
     155        if ( ! $temp ) 
     156            return false; 
    155157        if( ! @ftp_fget($this->link,$temp,$file,$type,$resumepos) ) 
    156158            return false; 
     
    172174        } 
    173175        $temp = tmpfile(); 
     176        if ( ! $temp ) 
     177            return false; 
    174178        fwrite($temp,$contents); 
    175179        fseek($temp, 0); //Skip back to the start of the file being written to 
  • trunk/wp-admin/includes/class-wp-filesystem-ftpsockets.php

    r7369 r7403  
    160160        $this->ftp->SetType($type); 
    161161        $temp = tmpfile(); 
     162        if ( ! $temp ) 
     163            return false; 
    162164        if ( ! $this->ftp->fget($temp, $file) ) { 
    163165            fclose($temp); 
     
    184186 
    185187        $temp = tmpfile(); 
     188        if ( ! $temp ) 
     189            return false; 
    186190        fwrite($temp,$contents); 
    187191        fseek($temp, 0); //Skip back to the start of the file being written to