GC_Fatal_Error_Handler::detect_error()

最后更新于:2021-11-27 14:45:29

GC_Fatal_Error_Handler::detect_error()

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.

源文件

文件: gc-includes/class-gc-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;
	}