WordPress.org

Make WordPress Core

Ticket #51665: 51665.diff

File 51665.diff, 497 bytes (added by mikeschroder, 15 months ago)

Run wp_mkdir_p before write.

  • src/wp-includes/class-wp-image-editor-imagick.php

    diff --git src/wp-includes/class-wp-image-editor-imagick.php src/wp-includes/class-wp-image-editor-imagick.php
    index ab9d302070f..b40006c1fa5 100644
    class WP_Image_Editor_Imagick extends WP_Image_Editor { 
    741741                                return true;
    742742                        }
    743743                } else {
     744                        wp_mkdir_p( dirname( $filename ) );
     745
    744746                        try {
    745747                                return $image->writeImage( $filename );
    746748                        } catch ( Exception $e ) {