X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/6c8f14c09105d0afa4c1574215c59b5021040e76..61343b82c4f0da4c68e4c6373daafff4a81efdd1:/wp-admin/custom-header.php diff --git a/wp-admin/custom-header.php b/wp-admin/custom-header.php index 14f01dfb..12288430 100644 --- a/wp-admin/custom-header.php +++ b/wp-admin/custom-header.php @@ -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 ); - $height = $data[ 'height' ]; - $width = $data[ 'width' ]; + $height = isset( $data[ 'height' ] ) ? $data[ 'height' ] : 0; + $width = isset( $data[ 'width' ] ) ? $data[ 'width' ] : 0; 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_data = array(); foreach ( $this->default_headers as $header => $details ) { if ( $details['url'] == $default ) { $default_data = $details;