From f94283c80b0a90a2d6ba46134fad1d11ae0b4b34 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 28 Mar 2019 19:03:47 +0000 Subject: [PATCH] Bootstrap/Load: Ensure the fatal error handler is registered after `WP_CONTENT_DIR` is defined, so the custom error handler drop-in could be properly loaded. Props sebastian.pisula, diddledan. Fixes #46069. git-svn-id: https://develop.svn.wordpress.org/trunk@45056 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-settings.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-settings.php b/src/wp-settings.php index 7b666e2851..518db55963 100644 --- a/src/wp-settings.php +++ b/src/wp-settings.php @@ -28,9 +28,6 @@ require( ABSPATH . WPINC . '/error-protection.php' ); require( ABSPATH . WPINC . '/default-constants.php' ); require_once( ABSPATH . WPINC . '/plugin.php' ); -// Make sure we register the shutdown handler for fatal errors as soon as possible. -wp_register_fatal_error_handler(); - /* * These can't be directly globalized in version.php. When updating, * we're including version.php from another installation and don't want @@ -51,6 +48,9 @@ global $blog_id; // Set initial default constants including WP_MEMORY_LIMIT, WP_MAX_MEMORY_LIMIT, WP_DEBUG, SCRIPT_DEBUG, WP_CONTENT_DIR and WP_CACHE. wp_initial_constants(); +// Make sure we register the shutdown handler for fatal errors as soon as possible. +wp_register_fatal_error_handler(); + // Check for the required PHP version and for the MySQL extension or a database drop-in. wp_check_php_mysql_versions();