[wp-trac] [WordPress Trac] #30138: Problem of getting the size (width and height) for .ico file

WordPress Trac noreply at wordpress.org
Tue Oct 28 18:35:33 UTC 2014


#30138: Problem of getting the size (width and height) for .ico file
--------------------------+-----------------------------
 Reporter:  solidcolour   |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Media         |    Version:  4.0
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Trying to use wp_get_attachment_metadata() or
 wp_get_attachment_image_src() functions to get .ico image size, but it
 always returns wrong values.

 wp_get_attachment_metadata() returns 0, 0 (width, height)
 wp_get_attachment_image_src() returns 1, 1 (width, height)

 And the Twenty Fourteen theme gets an error, when viewing the file (click
 View via Media Library).

 Warning: Illegal string offset...
 Notice: Uninitialized string offset...

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30138>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list