Themes: Avoid PHP warnings in the admin when no theme directory exists.

Props iseulde, chris_dev, swissspidy.
Fixes #35521.

Built from https://develop.svn.wordpress.org/trunk@40636


git-svn-id: http://core.svn.wordpress.org/trunk@40497 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Pascal Birchler 2017-05-11 19:21:44 +00:00
parent 0b1e3a05f7
commit 9af735e863
2 changed files with 6 additions and 1 deletions

View File

@ -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 ] );

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.8-alpha-40635';
$wp_version = '4.8-alpha-40636';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.