WP_Fatal_Error_Handler::detect_error()
Detects the error causing the crash if it should be handled.
Метод класса: WP_Fatal_Error_Handler{}
Хуков нет.
Возвращает
Массив|null
. Error information returned by error_get_last(), or null if none was recorded or the error should not be handled.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->detect_error();
Список изменений
С версии 5.2.0 | Введена. |
Код WP_Fatal_Error_Handler::detect_error() WP Fatal Error Handler::detect error WP 6.2.2
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; }