Index: wp-admin/includes/theme.php
===================================================================
--- wp-admin/includes/theme.php	(revision 19287)
+++ wp-admin/includes/theme.php	(working copy)
@@ -145,6 +145,9 @@
 		return get_themes();
 
 	$themes = get_themes();
+	if ( !is_array( $themes ) )
+		return false;
+
 	$ct = current_theme_info();
 	$allowed_themes = apply_filters("allowed_themes", get_site_allowed_themes() );
 	if ( $allowed_themes == false )
@@ -176,6 +179,9 @@
  */
 function get_page_templates() {
 	$themes = get_themes();
+	if ( !is_array( $themes ) )
+		return array();
+
 	$theme = get_current_theme();
 	$templates = $themes[$theme]['Template Files'];
 	$page_templates = array();
Index: wp-admin/includes/update.php
===================================================================
--- wp-admin/includes/update.php	(revision 19287)
+++ wp-admin/includes/update.php	(working copy)
@@ -221,7 +221,7 @@
 	$current = get_site_transient('update_themes');
 	$update_themes = array();
 
-	foreach ( $themes as $theme ) {
+	foreach ( (array) $themes as $theme ) {
 		$theme = (object) $theme;
 		if ( isset($current->response[ $theme->Stylesheet ]) ) {
 			$update_themes[$theme->Stylesheet] = $theme;
Index: wp-includes/theme.php
===================================================================
--- wp-includes/theme.php	(revision 19287)
+++ wp-includes/theme.php	(working copy)
@@ -480,7 +480,7 @@
 	$theme_roots = get_site_transient( 'theme_roots' );
 	if ( false === $theme_roots ) {
 		get_themes();
-		$theme_roots = get_site_transient( 'theme_roots' ); // this is set in get_theme()
+		$theme_roots = get_site_transient( 'theme_roots' ); // this is set in get_themes()
 	}
 	return $theme_roots;
 }
