From adbcddd6eb8b80b3472a33fe31251f793812b6e4 Mon Sep 17 00:00:00 2001 From: dd32 Date: Fri, 22 Jul 2011 10:57:34 +0000 Subject: [PATCH] Cast $themes to an array to avoid a PHP Warning when there are no themes currently installed. Fixes #18213 git-svn-id: http://svn.automattic.com/wordpress/trunk@18462 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/theme-install.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/includes/theme-install.php b/wp-admin/includes/theme-install.php index 1f24e40a4..b1ad8a6ea 100644 --- a/wp-admin/includes/theme-install.php +++ b/wp-admin/includes/theme-install.php @@ -262,7 +262,7 @@ function install_theme_information() { } $themes = get_themes(); - foreach ( $themes as $this_theme ) { + foreach ( (array) $themes as $this_theme ) { if ( is_array($this_theme) && $this_theme['Stylesheet'] == $api->slug ) { if ( $this_theme['Version'] == $api->version ) { $type = 'latest_installed';