Make WordPress Core

Changeset 43717


Ignore:
Timestamp:
10/11/2018 08:10:54 AM (8 years ago)
Author:
SergeyBiryukov
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, SergeyBiryukov.
Merges [42695] and [42702] to the 5.0 branch.
Fixes #43255.

Location:
branches/5.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0

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

    r41288 r43717  
    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.