On this page
apply_filters( 'wp_should_handle_php_error', bool $should_handle_error, array $error )
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().
Source
File: wp-includes/class-wp-fatal-error-handler.php. View all references
return (bool) apply_filters( 'wp_should_handle_php_error', false, $error );
Related
Used By
| Used By | Description |
|---|---|
| WP_Fatal_Error_Handler::should_handle_error() wp-includes/class-wp-fatal-error-handler.php | Determines whether we are dealing with an error that WordPress should handle in order to protect the admin backend against WSODs. |
Changelog
| Version | Description |
|---|---|
| 5.2.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_should_handle_php_error