Make WordPress Core

Changeset 7403


Ignore:
Timestamp:
03/19/2008 08:36:23 PM (18 years ago)
Author:
ryan
Message:

Check return of tmpfile(). see #5586

Location:
trunk/wp-admin/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.