Index: src/wp-admin/custom-header.php
===================================================================
--- src/wp-admin/custom-header.php	(revision 43291)
+++ src/wp-admin/custom-header.php	(working copy)
@@ -283,29 +283,29 @@
 			$type    = 'uploaded';
 		}
 
-		if ( 1 < count( $headers ) ) {
+		if ( is_countable( $headers ) && count( $headers ) > 1 ) {
 			echo '<div class="random-header">';
 			echo '<label><input name="default-header" type="radio" value="random-' . $type . '-image"' . checked( is_random_header_image( $type ), true, false ) . ' />';
 			_e( '<strong>Random:</strong> Show a different image on each page.' );
 			echo '</label>';
 			echo '</div>';
-		}
 
-		echo '<div class="available-headers">';
-		foreach ( $headers as $header_key => $header ) {
-			$header_thumbnail = $header['thumbnail_url'];
-			$header_url       = $header['url'];
-			$header_alt_text  = empty( $header['alt_text'] ) ? '' : $header['alt_text'];
-			echo '<div class="default-header">';
-			echo '<label><input name="default-header" type="radio" value="' . esc_attr( $header_key ) . '" ' . checked( $header_url, get_theme_mod( 'header_image' ), false ) . ' />';
-			$width = '';
-			if ( ! empty( $header['attachment_id'] ) ) {
-				$width = ' width="230"';
+			echo '<div class="available-headers">';
+			foreach ( $headers as $header_key => $header ) {
+				$header_thumbnail = $header['thumbnail_url'];
+				$header_url       = $header['url'];
+				$header_alt_text  = empty( $header['alt_text'] ) ? '' : $header['alt_text'];
+				echo '<div class="default-header">';
+				echo '<label><input name="default-header" type="radio" value="' . esc_attr( $header_key ) . '" ' . checked( $header_url, get_theme_mod( 'header_image' ), false ) . ' />';
+				$width = '';
+				if ( ! empty( $header['attachment_id'] ) ) {
+					$width = ' width="230"';
+				}
+				echo '<img src="' . set_url_scheme( $header_thumbnail ) . '" alt="' . esc_attr( $header_alt_text ) . '"' . $width . ' /></label>';
+				echo '</div>';
 			}
-			echo '<img src="' . set_url_scheme( $header_thumbnail ) . '" alt="' . esc_attr( $header_alt_text ) . '"' . $width . ' /></label>';
-			echo '</div>';
+			echo '<div class="clear"></div></div>';
 		}
-		echo '<div class="clear"></div></div>';
 	}
 
 	/**
