Ticket #19865: do_enclose-19735.diff
File do_enclose-19735.diff, 838 bytes (added by , 13 years ago) |
---|
-
wp-includes/functions.php
521 521 if ( $url != '' && !$wpdb->get_var( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = 'enclosure' AND meta_value LIKE (%s)", $post_ID, like_escape( $url ) . '%' ) ) ) { 522 522 523 523 if ( $headers = wp_get_http_headers( $url) ) { 524 $len = (int) $headers['content-length'];525 $type = $headers['content-type'];524 $len = isset( $headers['content-length'] )? (int) $headers['content-length'] : 0; 525 $type = isset( $headers['content-type'] )? $headers['content-type'] : ''; 526 526 $allowed_types = array( 'video', 'audio' ); 527 527 528 528 // Check to see if we can figure out the mime type from