WP_Fatal_Error_Handler::display_error_template

SummerySummery

Displays the PHP error template and sends the HTTP status code, typically 500.

Syntax

WP_Fatal_Error_Handler::display_error_template( array $error, true|WP_Error $handled )

DescriptionDescription

A drop-in ‘php-error.php’ can be used as a custom template. This drop-in should control the HTTP status code and print the HTML markup indicating that a PHP error occurred. Note that this drop-in may potentially be executed very early in the WordPress bootstrap process, so any core functions used that are not part of wp-includes/load.php should be checked for before being called.

If no such drop-in is available, this will call WP_Fatal_Error_Handler::display_default_error_template().

ParametersParameters

$error

(array) (Required) Error information retrieved from error_get_last().

$handled

(true|WP_Error) (Required) Whether Recovery Mode handled the fatal error.

SourceSource

File: wp-includes/class-wp-fatal-error-handler.php


			

ChangelogChangelog

Changelog
Version Description
5.3.0 The $handled parameter was added.
5.2.0 Introduced.
Scroll to Top