Index: wp-admin/includes/theme-install.php
===================================================================
--- wp-admin/includes/theme-install.php	(revision 10917)
+++ wp-admin/includes/theme-install.php	(working copy)
@@ -96,7 +96,9 @@
  *
  * @param string $page
  */
-function install_theme_search($page) {
+function install_theme_search( $page ) {
+	global $theme_field_defaults;
+
 	$type = isset($_REQUEST['type']) ? stripslashes( $_REQUEST['type'] ) : '';
 	$term = isset($_REQUEST['s']) ? stripslashes( $_REQUEST['s'] ) : '';
 
@@ -362,7 +364,7 @@
  * @param string $page
  * @param int $totalpages Number of pages.
  */
-function display_themes($themes, $page = 1, $totalpages = 1) {
+function display_themes( $themes, $page = 1, $totalpages = 1 ) {
 	global $themes_allowedtags;
 
 	$type = isset($_REQUEST['type']) ? stripslashes( $_REQUEST['type'] ) : '';
@@ -419,7 +421,7 @@
 		if ( $col == 1 ) $class[] = 'left';
 		if ( $row == $rows ) $class[] = 'bottom';
 		if ( $col == 3 ) $class[] = 'right';
-		$theme = $themes[$theme_index];
+		$theme = ( isset($themes[$theme_index]) ) ? $themes[$theme_index] : '';
 		?>
 		<td class="<?php echo join(' ', $class); ?>"><?php
 			display_theme($theme);
@@ -476,8 +478,8 @@
 	$type = 'install';
 	// Check to see if this theme is known to be installed, and has an update awaiting it.
 	$update_themes = get_transient('update_themes');
-	if ( is_object($update_themes) ) {
-		foreach ( (array)$update_themes->response as $file => $theme ) {
+	if ( is_object($update_themes) && isset($update_themes->response) ) {
+		foreach ( (array) $update_themes->response as $file => $theme ) {
 			if ( $theme->slug === $api->slug ) {
 				$type = 'update_available';
 				$update_file = $file;
@@ -618,10 +620,12 @@
 		return;
 	}
 
-	$theme = isset($_REQUEST['theme']) ? stripslashes( $_REQUEST['theme'] ) : '';
+	$theme        = isset($_REQUEST['theme'])        ? stripslashes( $_REQUEST['theme'] )        : '';
+	$theme_name   = isset($_REQUEST['theme_name'])   ? stripslashes( $_REQUEST['theme_name'] )   : '';
+	$download_url = isset($_REQUEST['download_url']) ? stripslashes( $_REQUEST['download_url'] ) : '';
 
 	$url = 'theme-install.php?tab=install';
-	$url = add_query_arg(array('theme' => $theme, 'theme_name' => stripslashes( $_REQUEST['theme_name'] ), 'download_url' => stripslashes( $_REQUEST['download_url'] ) ), $url);
+	$url = add_query_arg(array('theme' => $theme, 'theme_name' => $theme_name, 'download_url' => $download_url ), $url);
 
 	$url = wp_nonce_url($url, 'install-theme_' . $theme);
 	if ( false === ($credentials = request_filesystem_credentials($url)) )
