WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 4 years ago

#6921 closed defect (bug) (duplicate)

A bug in image_downsize() function [/wp-include/media.php]

Reported by: yasuaki327 Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.5.1
Component: Upload Keywords:
Focuses: Cc:

Description

Wordpress2.5 does not handle old type thumbnail images.

This bug will be in image_downsize() function.


original source

	elseif ( $size == 'thumbnail' ) {
		// fall back to the old thumbnail
		if ( $thumb_file = wp_get_attachment_thumb_file() && $info = getimagesize($thumb_file) ) {
			$img_url = str_replace(basename($img_url), basename($thumb_file), $img_url);
			$width = $info[0];
			$height = $info[1];
		}
	}


suggestion

	elseif ( $size == 'thumbnail' ) {
		// fall back to the old thumbnail
		
		$thumb_file = wp_get_attachment_thumb_file( $id );
		
		if ( $info = getimagesize($thumb_file) ) {
			$img_url = str_replace(basename($img_url), basename($thumb_file), $img_url);
			$width = $info[0];
			$height = $info[1];
		}
	}

Change History (6)

comment:1 ryan6 years ago

  • Milestone changed from 2.5.2 to 2.9

Milestone 2.5.2 deleted

comment:2 Denis-de-Bernardy5 years ago

  • Component changed from General to Upload
  • Owner anonymous deleted

comment:3 janeforshort4 years ago

  • Milestone changed from 2.9 to Future Release

Punting due to lack of community traction.

comment:4 filosofo4 years ago

  • Milestone Future Release deleted
  • Resolution set to invalid
  • Status changed from new to closed

Outdated, lack of interest. Closing. Reopen with a description of the actual problem.

comment:5 nacin4 years ago

  • Keywords image_downsize removed
  • Resolution invalid deleted
  • Status changed from closed to reopened

comment:6 nacin4 years ago

  • Resolution set to duplicate
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.