[wp-trac] [WordPress Trac] #25649: Warning in wp-admin/includes/images.php

WordPress Trac noreply at wordpress.org
Mon Oct 21 14:22:06 UTC 2013


#25649: Warning in wp-admin/includes/images.php
------------------------------+-----------------------------
 Reporter:  asakurayoh        |      Owner:
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Warnings/Notices  |    Version:  trunk
 Severity:  normal            |   Keywords:
------------------------------+-----------------------------
 So, in wp-admin/includes/images.php, on line 154, this line is throwing a
 warning:


 {{{
 unset( $metadata['image']['data'] );
 }}}

 because, if the file attachment is not an image (like a video or audio
 file) those array are not set. So I propose to change it to:


 {{{
 if(isset($metadata['image']) && isset($metadata['image']['data'])){
     unset( $metadata['image']['data'] );
 }
 }}}


 Thanks

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25649>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list