Changeset 38094
- Timestamp:
- 07/18/2016 07:42:48 PM (9 years ago)
- Location:
- trunk/src/wp-admin/includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-filesystem-ftpext.php
r35944 r38094 121 121 return false; 122 122 } 123 123 124 124 if ( ! @ftp_fget( $this->link, $temp, $file, FTP_BINARY ) ) { 125 125 fclose( $temp ); … … 127 127 return false; 128 128 } 129 129 130 130 fseek( $temp, 0 ); // Skip back to the start of the file being written to 131 131 $contents = ''; … … 160 160 $tempfile = wp_tempnam($file); 161 161 $temp = fopen( $tempfile, 'wb+' ); 162 if ( ! $temp ) 163 return false; 162 163 if ( ! $temp ) { 164 unlink( $tempfile ); 165 return false; 166 } 164 167 165 168 mbstring_binary_safe_encoding(); -
trunk/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php
r35944 r38094 122 122 $temp = wp_tempnam( $file ); 123 123 124 if ( ! $temphandle = fopen($temp, 'w+') ) 125 return false; 124 if ( ! $temphandle = fopen( $temp, 'w+' ) ) { 125 unlink( $temp ); 126 return false; 127 } 126 128 127 129 mbstring_binary_safe_encoding();
Note: See TracChangeset
for help on using the changeset viewer.