Changes between Initial Version and Version 1 of Ticket #30052, comment 7
- Timestamp:
- 11/24/2014 10:42:36 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #30052, comment 7
initial v1 3 3 When I tried to reset the value to a number below 1000 the new post IDs were still above 1000. 4 4 5 6 5 However... on another site, while investigating the placement of the crunching red herring I did get 7 6 8 9 ` 7 {{{ 10 8 <br /> 11 9 <b>Notice</b>: Undefined index: extension in <b>/home/herb/public_html/wp-includes/class-wp-image-editor.php</b> on line <b>360</b><br /> … … 13 11 <b>Notice</b>: Undefined index: extension in <b>/home/herb/public_html/wp-includes/class-wp-image-editor.php</b> on line <b>360</b><br /> 14 12 18948 15 ` 13 }}} 16 14 17 15 This is with WP_DEBUG( 'true' ); … … 19 17 The file I was uploading is called !.jpg 20 18 21 I can't reproduce the problem with PHP 5.5.18 on a Windows server 22 but on PHP 5.3.29, Linux the target file simply becomes jpg''n'' with a thumbnail called jpg''n''-300x182. 19 I can reproduce the problem on PHP 5.3.29 with a Linux server 20 21 The target file simply becomes jpg''n'', with a thumbnail called jpg''n''-300x182. 23 22 24 23 … … 31 30 6. media_handle_upload(async-upload,0) /home/herb/public_html/wp-admin/async-upload.php:87 2 32 31 33 /home/herb/public_html/wp-includes/class-wp-image-editor.php(357:0) 2014-11-24T17:54:29+00:00 89 cf! 39 0 58629568/58836616 generate_filename(8) 3 Array34 (35 [0] =>36 [1] =>37 [2] =>38 )39 32 40 /home/herb/public_html/wp-includes/class-wp-image-editor.php(357:0) 2014-11-24T17:54:29+00:00 90 cf! 39 0 58629608/58838952generate_filename(10) this_file WP_Image_Editor_Imagick Object41 ( 33 generate_filename(10) this_file WP_Image_Editor_Imagick Object 34 {{{ 42 35 [image:protected] => Imagick Object 43 36 ( … … 55 48 [quality:protected] => 56 49 [default_quality:protected] => 90 57 ) 50 }}} 58 51 59 52 60 53 $_FILES in media_handle_upload is 61 /home/herb/public_html/wp-admin/includes/media.php(255:0) 2014-11-24T18:10:14+00:00 84 cf! 27 0 58259600/58443960 media_handle_upload(2) 2 Array 62 ( 63 [0] => async-upload 64 [1] => 0 65 ) 66 67 /home/herb/public_html/wp-admin/includes/media.php(255:0) 2014-11-24T18:10:14+00:00 85 cf! 27 0 58259640/58443960 media_handle_upload(4) files Array 68 ( 54 {{{ 69 55 [async-upload] => Array 70 56 ( … … 75 61 [size] => 88711 76 62 ) 77 78 ) 63 }}} 79 64 80 65 It would appear that sanitize_file_name() is to blame - reducing the file to 81 /home/herb/public_html/wp-includes/formatting.php(1077:0) 2014-11-24T18:42:51+00:00 99 cf! 27 0 58282560/58446624 sanitize_file_name(16) parts! Array 82 ( 66 {{{ 83 67 [0] => jpg 84 ) 85 68 }}} 69 70 Note: I can also produce the problem on a PHP 5.5.18 Windows server using WP_Image_Editor_GD 71 72 It would appear that sanitize_file_name() is to blame - reducing the file to 73 {{{ 74 [0] => jpg 75 }}} 76 77 The question is... What is the expected output of sanitize_file_name() when it's all special characters? 78 79 80 86 81 87 82