Ticket #32755: 32755.diff
File 32755.diff, 606 bytes (added by , 10 years ago) |
---|
-
src/wp-admin/includes/media.php
844 844 // Set variables for storage, fix file filename for query strings. 845 845 preg_match( '/[^\?]+\.(jpe?g|jpe|gif|png)\b/i', $file, $matches ); 846 846 $file_array = array(); 847 if ( ! isset( $matches[0] ) ) { 848 return new WP_Error( 'image_sideload_failed', __( 'Invalid Image URL' ) ); 849 } 847 850 $file_array['name'] = basename( $matches[0] ); 848 851 849 852 // Download file to temp location.