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: https://develop.svn.wordpress.org/trunk@23744 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
72c65a3145
commit
1c2a9008c5
@ -326,6 +326,9 @@ abstract class WP_Image_Editor {
|
|||||||
protected function make_image( $filename, $function, $arguments ) {
|
protected function make_image( $filename, $function, $arguments ) {
|
||||||
$dst_file = $filename;
|
$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 ) ) {
|
if ( $stream = wp_is_stream( $filename ) ) {
|
||||||
$filename = null;
|
$filename = null;
|
||||||
ob_start();
|
ob_start();
|
||||||
|
Loading…
Reference in New Issue
Block a user