WordPress.org

Make WordPress Core

Changeset 19881


Ignore:
Timestamp:
02/08/2012 08:55:18 PM (8 years ago)
Author:
duck_
Message:

Prevent undefined index notices in do_enclose(). Props jeremyclarke. Fixes #19865.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r19862 r19881  
    522522
    523523            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'] : '';
    526526                $allowed_types = array( 'video', 'audio' );
    527527
Note: See TracChangeset for help on using the changeset viewer.