Ticket #6921 (new defect)

Opened 7 months ago

Last modified 4 months ago

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

Reported by: yasuaki327 Assigned to: anonymous
Priority: normal Milestone: 2.9
Component: General Version: 2.5.1
Severity: normal Keywords: image_downsize
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

07/15/08 16:24:07 changed by ryan

  • milestone changed from 2.5.2 to 2.9.

Milestone 2.5.2 deleted