Make WP_Image_Editor::make_image() safe for replication plugins by making sure the directory for the image being made exists.
Props batmoo fixes #23306 git-svn-id: http://core.svn.wordpress.org/trunk@23744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
dfd8479246
commit
b09f9fa157
|
@ -326,6 +326,9 @@ abstract class WP_Image_Editor {
|
|||
protected function make_image( $filename, $function, $arguments ) {
|
||||
$dst_file = $filename;
|
||||
|
||||
// The directory containing the original file may no longer exist when using a replication plugin.
|
||||
wp_mkdir_p( dirname( $dst_file ) );
|
||||
|
||||
if ( $stream = wp_is_stream( $filename ) ) {
|
||||
$filename = null;
|
||||
ob_start();
|
||||
|
|
Loading…
Reference in New Issue