From 4429d66a152c86c9e2d3eaaa37219be059cdbdb9 Mon Sep 17 00:00:00 2001 From: Dion Hulse 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: https://develop.svn.wordpress.org/trunk@18462 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 1f24e40a4b..b1ad8a6eae 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';