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:
Ryan Boren 2013-03-18 18:05:23 +00:00
parent 72c65a3145
commit 1c2a9008c5
1 changed files with 3 additions and 0 deletions

View File

@ -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();