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

WordPress Trac noreply at wordpress.org
Thu Jan 12 05:38:04 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 ralva83702):

 Thanks so much for working on this. I've been testing this, found that in
 my installation, PHP 5.6.24-1+deb.sury.org~trusty+1, the first part  of
 wp_get_image_mime, the getimagesize function sets the mime to "application
 /octet-stream" so in the part you added I changed the if to:

  if ( ( 0 === strpos($mime , "application/octet-stream") || false ===
 $mime) && function_exists( 'finfo_file' ) ) {

 Of course why that is happening I have no idea, doesn't match php docs,
 what version of php are you testing on?

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


More information about the wp-trac mailing list