Bootstrap/Load: Fix notice when theme directories are not populated yet.

When a fatal error occurs outside of a regular plugin in a stage where theme directories are not set up yet (for example in a MU plugin), this would previously trigger a notice.

Props johnbillion.
Fixes #46068. See #44458.

Built from https://develop.svn.wordpress.org/trunk@44706


git-svn-id: http://core.svn.wordpress.org/trunk@44537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Felix Arntz 2019-01-28 17:43:51 +00:00
parent c0339fc3da
commit e7e87ca545
2 changed files with 5 additions and 1 deletions

View File

@ -68,6 +68,10 @@ function wp_record_extension_error( $error ) {
$callback = 'wp_paused_plugins';
$path = str_replace( $wp_plugin_dir . '/', '', $error_file );
} else {
if ( empty( $wp_theme_directories ) ) {
return false;
}
foreach ( $wp_theme_directories as $theme_directory ) {
$theme_directory = wp_normalize_path( $theme_directory );
if ( 0 === strpos( $error_file, $theme_directory ) ) {

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.1-beta2-44705';
$wp_version = '5.1-beta2-44706';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.