mansj / enable-media-replace

***DEVELOPMENT DISCONTINUED*** Enable Media Replace, a WordPress plugin to make it possible to replace uploaded media files in a simple way.
GNU General Public License v2.0
28 stars 27 forks source link

Issues with umlauts in filenames #17

Closed cywtf closed 8 years ago

cywtf commented 8 years ago

I am having issues with umlauts in file names. Whenever I am uploading such a file directly in the Media Library (not even using Replace Image yet) I receive the following error:

Warning: filemtime(): stat failed for domain/html/wp-content/uploads/A?O?U?-a?o?u?-a?a?a?-ø-a?-æ-A?O?U?-ß2.jpg in domain/html/wp-content/plugins/enable-media-replace/enable-media-replace.php on line 131

And then when trying to replace the image with umlaut with another one

Warning: fileperms(): stat failed for domain/html/wp-content/uploads/A?O?U?-a?o?u?-a?a?a?-ø-a?-æ-A?O?U?-ß2.jpg in domain/html/wp-content/plugins/enable-media-replace/upload.php on line 93

Warning: Cannot modify header information - headers already sent by (output started at domain/html/wp-content/plugins/enable-media-replace/upload.php:93) in domain/html/wp-includes/pluggable.php on line 1207
Thank you for creating with WordPress.

The warning from the Media Library disappears when I deactivate the plugin.

mansj commented 8 years ago

Yes, umlauts in file names are an abomination. It's hard to say exactly why this would happen, but obviously filemtime() has a different opinion on how to stat UTF-8 file names.

9 dec. 2015 kl. 17:27 skrev rootion notifications@github.com:

I am having issues with umlauts in file names. Whenever I am uploading such a file directly in the Media Library (not even using Replace Image yet) I receive the following error:

Warning: filemtime(): stat failed for domain/html/wp-content/uploads/A?O?U?-a?o?u?-a?a?a?-ø-a?-æ-A?O?U?-ß2.jpg in domain/html/wp-content/plugins/enable-media-replace/enable-media-replace.php on line 131

And then when trying to replace the image with umlaut with another one

Warning: fileperms(): stat failed for domain/html/wp-content/uploads/A?O?U?-a?o?u?-a?a?a?-ø-a?-æ-A?O?U?-ß2.jpg in domain/html/wp-content/plugins/enable-media-replace/upload.php on line 93

Warning: Cannot modify header information - headers already sent by (output started at domain/html/wp-content/plugins/enable-media-replace/upload.php:93) in domain/html/wp-includes/pluggable.php on line 1207 Thank you for creating with WordPress.

The warning from the Media Library disappears when I deactivate the plugin.

— Reply to this email directly or view it on GitHub.