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.


git-svn-id: https://develop.svn.wordpress.org/trunk@44706 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Felix Arntz
2019-01-28 17:42:55 +00:00
parent ad71116f38
commit 4254a35ad8
+4
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 ) ) {