diff --git a/src/wp-admin/theme-install.php b/src/wp-admin/theme-install.php index eb956f4380..dd9ff500d1 100644 --- a/src/wp-admin/theme-install.php +++ b/src/wp-admin/theme-install.php @@ -28,6 +28,11 @@ if ( ! is_network_admin() ) { } $installed_themes = search_theme_directories(); + +if ( false === $installed_themes ) { + $installed_themes = array(); +} + foreach ( $installed_themes as $k => $v ) { if ( false !== strpos( $k, '/' ) ) { unset( $installed_themes[ $k ] );