WordPress.org

Make WordPress Core

Ticket #6821: 6821.13.diff

File 6821.13.diff, 706 bytes (added by ryan, 7 years ago)

In wp_crop_image(), preserve both $src_file and $src.

  • wp-admin/includes/image.php

     
    3030                if ( ! file_exists( $src_file ) ) {
    3131                        // If the file doesn't exist, attempt a url fopen on the src link.
    3232                        // This can occur with certain file replication plugins.
    33                         $src_file = _load_image_to_edit_path( $src, 'full' );
     33                        $src = _load_image_to_edit_path( $src, 'full' );
     34                } else {
     35                        $src = $src_file;
    3436                }
    3537        }
    3638
    37         $editor = WP_Image_Editor::get_instance( $src_file );
     39        $editor = WP_Image_Editor::get_instance( $src );
    3840        if ( is_wp_error( $editor ) )
    3941                return $editor;
    4042