Skip to content
Permalink
Browse files

Media: In WP_Image_Editor::make_image(), close previously opened outp…

…ut buffer if the file could not be created.

In addition to the merge noted below, includes important brackets added in [42343].

Props dhanendran, gnif, sergey.
Merges [42695] and [42702] to the 4.9 branch.
Fixes #43255.



git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43649 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information...
getsource committed Sep 18, 2018
1 parent dc70d3e commit 830632f797cc0b2943658d69008686db49d622ba
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/wp-includes/class-wp-image-editor.php
@@ -406,8 +406,10 @@ protected function make_image( $filename, $function, $arguments ) {
$fp = fopen( $filename, 'w' );
if ( ! $fp )
if ( ! $fp ) {
ob_end_clean();
return false;
}
fwrite( $fp, $contents );
fclose( $fp );

0 comments on commit 830632f

Please sign in to comment.
You can’t perform that action at this time.