Index: src/wp-settings.php
===================================================================
--- src/wp-settings.php	(revision 45139)
+++ src/wp-settings.php	(working copy)
@@ -48,6 +48,9 @@
 // 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();
 
+// Check if we're in WP_DEBUG mode.
+wp_debug_mode();
+
 // Make sure we register the shutdown handler for fatal errors as soon as possible.
 wp_register_fatal_error_handler();
 
@@ -76,9 +79,6 @@
 // Start loading timer.
 timer_start();
 
-// Check if we're in WP_DEBUG mode.
-wp_debug_mode();
-
 /**
  * Filters whether to enable loading of the advanced-cache.php drop-in.
  *
Index: src/wp-includes/load.php
===================================================================
--- src/wp-includes/load.php	(revision 45139)
+++ src/wp-includes/load.php	(working copy)
@@ -339,6 +339,8 @@
 			ini_set( 'log_errors', 1 );
 			ini_set( 'error_log', $log_path );
 		}
+
+		define( 'WP_DISABLE_FATAL_ERROR_HANDLER', true );
 	} else {
 		error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
 	}
