Changeset 32712
- Timestamp:
- 06/09/2015 03:54:49 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-http.php
r32650 r32712 214 214 */ 215 215 if ( $r['stream'] && empty( $r['filename'] ) ) { 216 $r['filename'] = wp_unique_filename( get_temp_dir(), basename( $url ) );216 $r['filename'] = get_temp_dir() . wp_unique_filename( get_temp_dir(), basename( $url ) ); 217 217 } 218 218 -
trunk/tests/phpunit/tests/http/base.php
r31290 r32712 189 189 $filesize = filesize( $res['filename'] ); 190 190 unlink( $res['filename'] ); 191 } 191 } 192 192 193 193 $this->assertFalse( is_wp_error( $res ) ); … … 195 195 $this->assertEquals( $size, $res['headers']['content-length'] ); // Check the headers are returned (and the size is the same..) 196 196 $this->assertEquals( $size, $filesize ); // Check that the file is written to disk correctly without any extra characters 197 $this->assertStringStartsWith( get_temp_dir(), $res['filename'] ); // Check it's saving within the temp dir 197 198 } 198 199
Note: See TracChangeset
for help on using the changeset viewer.