apply_filters( 'wp_should_handle_php_error', bool $should_handle_error, array $error )
- Since
- 5.2.0
Filters whether a given thrown error should be handled by the fatal error handler.
Description
This filter is only fired if the error is not already configured to be handled by WordPress core. As such, it exclusively allows adding further rules for which errors should be handled, but not removing existing ones.
Parameters
$should_handle_errorbool- Whether the error should be handled by the fatal error handler.
$errorarray- Error information retrieved from
error_get_last().
Fired at · 1
wp-includes/class-wp-fatal-error-handler.php:125WP_Fatal_Error_Handler::should_handle_error()
Source
* * @since 5.2.0 * * @param bool $should_handle_error Whether the error should be handled by the fatal error handler. * @param array $error Error information retrieved from `error_get_last()`. */ return (bool) apply_filters( 'wp_should_handle_php_error', false, $error ); } /** * Displays the PHP error template and sends the HTTP status code, typically 500. * * A drop-in 'php-error.php' can be used as a custom template. This drop-in should control the HTTP status code andHistory
Introduced in 5.2.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.8.8 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.