Closed rhurling closed 8 years ago
Thanks, I guess the the output is horribly verbose eitherway! Which php version did you use? I guess I had warnings turned off because I didn't see them.
I'm using PHP 5.5.9.
The second Notice (missing $ascii_file
variable) will break the conversion in some places, which is (arguably) more important. Any idea for that one?
See: https://github.com/devgeniem/wp-sanitize-accented-uploads/blob/master/wp-cli-integration.php#L199 If there's no variable the value will be set to an empty string or NULL, which may or may not break something (not sure how those 2 meta keys are handled/used in WordPress)
I guess i had changed this accidentally will look into this, thanks for reporting!
I think this one fixes the problem: 74791a8aa75ca670b9f1e499f4a4c61a674fd80e
Thanks for reporting about this!
I'm not sure whether that fixes it, because on my site the meta_value for _wp_attachment_metadata includes the year/date bit (2016/03/Arbeitunfähigkeitsbescheinigung.jpg). So only the filename wouldn't work when using date based upload sorting.
We can continue this over here: https://github.com/devgeniem/wp-sanitize-accented-uploads/issues/3
This change prevents a LOT of PHP Notices when not using the --verbose flag
There is another PHP Notice
Notice: Undefined variable: ascii_file in [...]/wp-content/plugins/wp-sanitize-accented-uploads/wp-cli-integration.php on line 160
But I'm not sure which variable it's supposed to use. I think it might be$ascii_full_path
, but I'm not sure whether thats correct.