Make WordPress Core

Changeset 22553


Ignore:
Timestamp:
11/13/2012 12:03:55 AM (14 years ago)
Author:
ryan
Message:

In wp_crop_image(), preserve both src_file and src. src_file must be preserved even when url fopen is used so that we don't try to save to a filename based on the url.

see #6821

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/image.php

    r22538 r22553  
    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' );
    34                 }
    35         }
    36 
    37         $editor = WP_Image_Editor::get_instance( $src_file );
     33                        $src = _load_image_to_edit_path( $src, 'full' );
     34                } else {
     35                        $src = $src_file;
     36                }
     37        }
     38
     39        $editor = WP_Image_Editor::get_instance( $src );
    3840        if ( is_wp_error( $editor ) )
    3941                return $editor;
Note: See TracChangeset for help on using the changeset viewer.