mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-28 12:07:36 +01: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. Merges [43039] to the 4.9 branch. Fixes #43374. See #40109. Built from https://develop.svn.wordpress.org/branches/4.9@43040 git-svn-id: http://core.svn.wordpress.org/branches/4.9@42869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f04d84149f
commit
cf7288a673
@ -353,8 +353,9 @@ 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';
|
||||
}
|
||||
|
||||
$theme_roots = get_site_transient( 'theme_roots' );
|
||||
if ( false === $theme_roots ) {
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.9.6-alpha-43038';
|
||||
$wp_version = '4.9.6-alpha-43040';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user