[wp-trac] [WordPress Trac] #29370: wp_get_attachment_image() returning unexpected image size

WordPress Trac noreply at wordpress.org
Tue Feb 17 20:57:55 UTC 2015


#29370: wp_get_attachment_image() returning unexpected image size
---------------------------+------------------------------
 Reporter:  martinleopold  |       Owner:
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Media          |     Version:  3.9.2
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:
---------------------------+------------------------------

Comment (by martinleopold):

 this persists to wordpress 4.1:
 https://core.trac.wordpress.org/browser/tags/4.1/src/wp-
 includes/media.php#L609

 {{{
 if ( 'thumbnail' != $_size && ( !$maybe_cropped || ( $maybe_cropped[4] !=
 $data['width'] && $maybe_cropped[4] + 1 != $data['width'] ) || (
 $maybe_cropped[5] != $data['height'] && $maybe_cropped[5] + 1 !=
 $data['height'] ) ) )
 }}}

 which should be, imho:
 {{{
 if ( ( !$maybe_cropped || ( $maybe_cropped[4] != $data['width'] &&
 $maybe_cropped[4] + 1 != $data['width'] ) || ( $maybe_cropped[5] !=
 $data['height'] && $maybe_cropped[5] + 1 != $data['height'] ) ) )
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29370#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list