]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/custom-header.php
Wordpress 3.6
[autoinstalls/wordpress.git] / wp-admin / custom-header.php
index 14f01dfb587a6f77cb6e2f118a8406ed8029925f..12288430cdaed074a7740da2a62dad182e706c65 100644 (file)
@@ -663,8 +663,8 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
                        list( $width, $height, $type, $attr ) = getimagesize( $file );
                } else {
                        $data = wp_get_attachment_metadata( $attachment_id );
                        list( $width, $height, $type, $attr ) = getimagesize( $file );
                } else {
                        $data = wp_get_attachment_metadata( $attachment_id );
-                       $height = $data[ 'height' ];
-                       $width = $data[ 'width' ];
+                       $height = isset( $data[ 'height' ] ) ? $data[ 'height' ] : 0;
+                       $width = isset( $data[ 'width' ] ) ? $data[ 'width' ] : 0;
                        unset( $data );
                }
 
                        unset( $data );
                }
 
@@ -1001,6 +1001,7 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
 
                $default = sprintf( $default, get_template_directory_uri(), get_stylesheet_directory_uri() );
 
 
                $default = sprintf( $default, get_template_directory_uri(), get_stylesheet_directory_uri() );
 
+               $default_data = array();
                foreach ( $this->default_headers as $header => $details ) {
                        if ( $details['url'] == $default ) {
                                $default_data = $details;
                foreach ( $this->default_headers as $header => $details ) {
                        if ( $details['url'] == $default ) {
                                $default_data = $details;