If filename from uploads directory contains Unicode characters, infinite loop will occur.
This happens on Windows, not sure for Linux.
To fix this, two things needs to be changed in class-404-template.php file.
In function get_local_path() replace line
$this->local_path = $requested_path;
with
$this->local_path = urldecode($requested_path);
Then, in function download() add snippet
if(strcasecmp(substr(PHP_OS, 0, 3), 'WIN') == 0){
$abspath = iconv('UTF-8', 'WINDOWS-1252', $abspath);
}
before line
$saved_image = $wp_filesystem->put_contents.....
If filename from uploads directory contains Unicode characters, infinite loop will occur.
This happens on Windows, not sure for Linux.
To fix this, two things needs to be changed in
class-404-template.phpfile.In function
get_local_path()replace line$this->local_path = $requested_path;with
$this->local_path = urldecode($requested_path);Then, in function
download()add snippetbefore line
$saved_image = $wp_filesystem->put_contents.....