Themes: Avoid a PHP 7.2 warning in `get_theme_roots()` when `$wp_theme_directories` is an uncountable value.

See [41174] for `wp_get_themes()` and `get_raw_theme_root()`.

Props burlingtonbytes, teddytime, lbenicio, desrosj.
Fixes #43374. See #40109.

git-svn-id: https://develop.svn.wordpress.org/trunk@43039 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2018-04-30 04:50:52 +00:00
parent 451ba4c401
commit a2b95a643f
1 changed files with 1 additions and 1 deletions

View File

@ -370,7 +370,7 @@ function get_template_directory_uri() {
function get_theme_roots() {
global $wp_theme_directories;
if ( count( $wp_theme_directories ) <= 1 ) {
if ( ! is_array( $wp_theme_directories ) || count( $wp_theme_directories ) <= 1 ) {
return '/themes';
}