mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
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:
@@ -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 ) ) {
|
||||
|
||||
Reference in New Issue
Block a user