Ticket #6821: 6821.13.diff

File 6821.13.diff, 706 bytes (added by ryan, 6 months ago)

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

Line 
1Index: wp-admin/includes/image.php
2===================================================================
3--- wp-admin/includes/image.php (revision 22549)
4+++ wp-admin/includes/image.php (working copy)
5@@ -30,11 +30,13 @@
6                if ( ! file_exists( $src_file ) ) {
7                        // If the file doesn't exist, attempt a url fopen on the src link.
8                        // This can occur with certain file replication plugins.
9-                       $src_file = _load_image_to_edit_path( $src, 'full' );
10+                       $src = _load_image_to_edit_path( $src, 'full' );
11+               } else {
12+                       $src = $src_file;
13                }
14        }
15 
16-       $editor = WP_Image_Editor::get_instance( $src_file );
17+       $editor = WP_Image_Editor::get_instance( $src );
18        if ( is_wp_error( $editor ) )
19                return $editor;
20