WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/29/2013 08:51:35 PM (9 years ago)
Author:
markjaquith
Message:

Sanity checks on image metadata to avoid warnings, etc.

fixes #23733. props wonderboymusic.

File:
1 edited

Legend:

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

    r23633 r23873  
    10141014        $header_images[$header_index]['url'] =  $url;
    10151015        $header_images[$header_index]['thumbnail_url'] =  $url;
    1016         $header_images[$header_index]['width'] = $header_data['width'];
    1017         $header_images[$header_index]['height'] = $header_data['height'];
     1016        if ( isset( $header_data['width'] ) )
     1017            $header_images[$header_index]['width'] = $header_data['width'];
     1018        if ( isset( $header_data['height'] ) )
     1019            $header_images[$header_index]['height'] = $header_data['height'];
    10181020    }
    10191021
Note: See TracChangeset for help on using the changeset viewer.