Summery Summery
Detects the error causing the crash if it should be handled.
Syntax Syntax
Return Return
(array|null) Error that was triggered, or null if no error received or if the error should not be handled.
Source Source
File: wp-includes/class-wp-fatal-error-handler.php
*
* @since 5.2.0
*
* @return array|null Error that was triggered, or null if no error received or if the error should not be handled.
*/
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 ) ) {
Advertisement
Changelog Changelog
| Version | Description |
|---|---|
| 5.2.0 | Introduced. |