[wp-trac] [WordPress Trac] #6921: A bug in image_downsize() function
[/wp-include/media.php]
WordPress Trac
wp-trac at lists.automattic.com
Mon May 5 09:58:09 GMT 2008
#6921: A bug in image_downsize() function [/wp-include/media.php]
------------------------+---------------------------------------------------
Reporter: yasuaki327 | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.5.2
Component: General | Version: 2.5.1
Severity: normal | Keywords: image_downsize
------------------------+---------------------------------------------------
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];
}
}
}}}
--
Ticket URL: <http://trac.wordpress.org/ticket/6921>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list