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:
parent
451ba4c401
commit
a2b95a643f
@ -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';
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user