mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
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:
@@ -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';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user