mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-12 13:44:21 +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. Fixes #43374. See #40109. Built from https://develop.svn.wordpress.org/trunk@43039 git-svn-id: http://core.svn.wordpress.org/trunk@42868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
94cbb2a3f6
commit
4b6794ba57
@ -370,7 +370,7 @@ function get_template_directory_uri() {
|
|||||||
function get_theme_roots() {
|
function get_theme_roots() {
|
||||||
global $wp_theme_directories;
|
global $wp_theme_directories;
|
||||||
|
|
||||||
if ( count( $wp_theme_directories ) <= 1 ) {
|
if ( ! is_array( $wp_theme_directories ) || count( $wp_theme_directories ) <= 1 ) {
|
||||||
return '/themes';
|
return '/themes';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.0-alpha-43036';
|
$wp_version = '5.0-alpha-43039';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user