[wp-trac] [WordPress Trac] #17626: image_get_intermediate_size() may return wrong thumbnail size
WordPress Trac
noreply at wordpress.org
Fri Oct 2 14:13:17 UTC 2015
#17626: image_get_intermediate_size() may return wrong thumbnail size
--------------------------+-----------------------------
Reporter: chipbennett | Owner: wonderboymusic
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.4
Component: Media | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses:
--------------------------+-----------------------------
Comment (by boonebgorges):
In [changeset:"34775"]:
{{{
#!CommitTicketReference repository="" revision="34775"
More explicit tests for `image_get_intermediate_size()`.
After [33807],
`Tests_Image_Intermediate_Size::test_get_intermediate_sizes_by_array_zero_width()`
was failing intermittently. This failure was due to the use of a random
number
for the image height. When the height was sufficiently large - $height >=
202 -
to change the aspect ratio of the cropped image (based on WP's threshold
of a
1px difference), the test passed. And when the height was exactly 200, the
medium image size was hit exactly. The failure occurred only with a height
of
201, which is close enough to 200 so that WP determined that the aspect
ratio
of the potential crop was close enough to match.
The current changeset splits the test into two, in order to demonstrate
the
failure.
See #17626. Fixes #34087.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/17626#comment:42>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list