Uses
Uses | Description |
---|---|
wp-includes/class-wp-fatal-error-handler.php: WP_Fatal_Error_Handler::should_handle_error() | Determines whether we are dealing with an error that WordPress should handle in order to protect the admin backend against WSODs. |
Detects the error causing the crash if it should be handled.
(array|null) Error that was triggered, or null if no error received or if the error should not be handled.
File: wp-includes/class-wp-fatal-error-handler.php
protected function detect_error() { $error = error_get_last(); // No error, just skip the error handling code. if ( null === $error ) { return null; } // Bail if this error should not be handled. if ( ! $this->should_handle_error( $error ) ) { return null; } return $error; }
Version | Description |
---|---|
5.2.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_fatal_error_handler/detect_error