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

Props dhanendran, gnif.
Fixes #43255.
Built from https://develop.svn.wordpress.org/trunk@42695


git-svn-id: http://core.svn.wordpress.org/trunk@42523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2018-02-11 16:25:31 +00:00
parent beeafbc7ec
commit e6322d0afe
2 changed files with 4 additions and 1 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;
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-42694';
$wp_version = '5.0-alpha-42695';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.