[wp-trac] [WordPress Trac] #19695: Links widget does not generate width or height attributes when showing an image
WordPress Trac
wp-trac at lists.automattic.com
Fri Dec 30 17:29:10 UTC 2011
#19695: Links widget does not generate width or height attributes when showing an
image
------------------------------------------------+--------------------------
Reporter: mbijon | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
Component: Widgets | Review
Severity: normal | Version: 3.3
Keywords: dev-feedback 2nd-opinion has-patch | Resolution:
------------------------------------------------+--------------------------
Comment (by mbijon):
Thanks Eric. Per your Twitter reference to {{{/wp-includes/media.php}}},
that's what I started from. My main change is using the 4th value returned
by {{{getimagesize()}}} instead of building a string.
I'm not sure about throwing an error if GD Lib isn't installed (in
attachment:ticket:19695:19695.3.diff). I don't like doing that because GD
isn't a requirement for installing WP,
http://wordpress.org/about/requirements/. My method failed past that on
purpose.
Note that PHP downgraded {{{getimagesize()}}} read errors to E_NOTICE in
5.2. I think that's the right approach, and that delivering content
instead of an error msg is more important than having correctly-set image
attributes.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19695#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list