Media: In `WP_Image_Editor::make_image()`, close previously opened output buffer if the file could not be created.

Props dhanendran, gnif.
Fixes #43255.

git-svn-id: https://develop.svn.wordpress.org/trunk@42695 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2018-02-11 16:24:05 +00:00
parent 0711e585fb
commit 909424b9af
1 changed files with 3 additions and 0 deletions

View File

@ -409,6 +409,9 @@ abstract class WP_Image_Editor {
$fp = fopen( $filename, 'w' );
if ( ! $fp ) {
if ( $stream ) {
ob_end_clean();
}
return false;
}