[wp-trac] [WordPress Trac] #39552: SVG upload support broken in 4.7.1

WordPress Trac noreply at wordpress.org
Thu Jan 12 11:40:25 UTC 2017


#39552: SVG upload support broken in 4.7.1
----------------------------------------+--------------------
 Reporter:  freakpants                  |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  4.7.2
Component:  Upload                      |     Version:  trunk
 Severity:  normal                      |  Resolution:
 Keywords:  needs-unit-tests has-patch  |     Focuses:
----------------------------------------+--------------------

Comment (by freakpants):

 While not documented, application/octet-stream is the expected result when
 image_type_to_mime_type is called with something that isn't one of the
 constants:

 {{{#!php
 default:
 case IMAGE_FILETYPE_UNKNOWN:
     return "application/octet-stream"; /* suppose binary format */
 }}}

 (as seen in https://github.com/php/php-
 src/blob/c8aa6f3a9a3d2c114d0c5e0c9fdd0a465dbb54a5/ext/standard/image.c)

 In our specific case it is called with "false", since exif-imagetype cant
 detect svg.

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


More information about the wp-trac mailing list