Image sideloader fix from noel. see #6813
git-svn-id: http://svn.automattic.com/wordpress/trunk@8192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
55b0c88e2c
commit
b42b7b33a7
|
@ -285,7 +285,11 @@ function wp_handle_sideload( &$file, $overrides = false ) {
|
|||
return $upload_error_handler( $file, $uploads['error'] );
|
||||
|
||||
$filename = wp_unique_filename( $uploads['path'], $file['name'], $unique_filename_callback );
|
||||
|
||||
|
||||
// Strip the query strings.
|
||||
$filename = str_replace('?','-', $filename);
|
||||
$filename = str_replace('&','-', $filename);
|
||||
|
||||
// Move the file to the uploads dir
|
||||
$new_file = $uploads['path'] . "/$filename";
|
||||
if ( false === @ rename( $file['tmp_name'], $new_file ) ) {
|
||||
|
|
Loading…
Reference in New Issue