Make WordPress Core


Ignore:
Timestamp:
11/10/2012 08:42:27 PM (11 years ago)
Author:
ryan
Message:

Pass an attachment ID, not a file path, to _load_image_to_edit_path() from wp_crop_image(). This fixes handling of attachments that require url fopen to access the image.

Allow passing urls instead of just file paths to WP_Image_Editor_Imagick::load() and WP_Image_Editor_GD::load() so that attachments requiring URL fopen can be handled.

see #6821

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-image-editor-gd.php

    r22510 r22538  
    5252            return true;
    5353
    54         if ( ! is_file( $this->file ) )
     54        if ( ! is_file( $this->file ) && ! preg_match( '|^https?://|', $this->file ) )
    5555            return new WP_Error( 'error_loading_image', __('File doesn’t exist?'), $this->file );
    5656
Note: See TracChangeset for help on using the changeset viewer.