Make WordPress Core

Changeset 43649


Ignore:
Timestamp:
09/18/2018 10:01:25 PM (8 years ago)
Author:
mikeschroder
Message:

Media: In WP_Image_Editor::make_image(), close previously opened output 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.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-includes/class-wp-image-editor.php

    r41288 r43649  
    407407                        $fp = fopen( $filename, 'w' );
    408408
    409                         if ( ! $fp )
     409                        if ( ! $fp ) {
     410                                ob_end_clean();
    410411                                return false;
     412                        }
    411413
    412414                        fwrite( $fp, $contents );
Note: See TracChangeset for help on using the changeset viewer.