Make WordPress Core

Opened 16 years ago

Closed 14 years ago

#6921 closed defect (bug) (duplicate)

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

Reported by: yasuaki327's profile 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)

#1 @ryan
16 years ago

  • Milestone changed from 2.5.2 to 2.9

Milestone 2.5.2 deleted

#2 @Denis-de-Bernardy
15 years ago

  • Component changed from General to Upload
  • Owner anonymous deleted

#3 @janeforshort
14 years ago

  • Milestone changed from 2.9 to Future Release

Punting due to lack of community traction.

#4 @filosofo
14 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.

#5 @nacin
14 years ago

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

#6 @nacin
14 years ago

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