[wp-trac] [WordPress Trac] #22532: It is assumed that a mime type has a minimum of two parts when splitted by "/"

WordPress Trac noreply at wordpress.org
Wed Nov 21 19:57:53 UTC 2012


#22532: It is assumed that a mime type has a minimum of two parts when splitted by
"/"
--------------------------+--------------------
 Reporter:  Chouby        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  low           |   Milestone:  3.5
Component:  Media         |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+--------------------
Changes (by nacin):

 * priority:  normal => low
 * milestone:  Awaiting Review => 3.5


Old description:

> While testing the version 3.5-beta3-22734, I got the following notice
> (due to an attachment created without media file):[[BR]]
> PHP Notice:  Undefined offset: 1 in /wp-includes/media.php on line
> 1242[[BR]]
> The line is:[[BR]]
> {{{
> list( $type, $subtype ) = explode( '/', $attachment->post_mime_type );
> }}}
> See also: [http://core.trac.wordpress.org/ticket/22186 22186]

New description:

 While testing the version 3.5-beta3-22734, I got the following notice (due
 to an attachment created without media file):[[BR]]
 PHP Notice:  Undefined offset: 1 in /wp-includes/media.php on line
 1242[[BR]]
 The line is:[[BR]]
 {{{
 list( $type, $subtype ) = explode( '/', $attachment->post_mime_type );
 }}}
 See also: #22186

--

Comment:

 Yeah, we should avoid making this assumption.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22532#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list