Warning: fopen(/home/danestany/public_html/wp-content/plugins/wordfence/waf/../languages/wordfence.mo): failed to open stream: No such file or directory in /home/danestany/public_html/wp-content/plugins/wordfence/waf/pomo/streams.php on line 185
r Error information retrieved from `error_get_last()`.
* @param true|WP_Error $handled Whether Recovery Mode handled the fatal error.
*/
protected function display_error_template( $error, $handled ) {
if ( defined( 'WP_CONTENT_DIR' ) ) {
// Load custom PHP error template, if present.
$php_error_pluggable = WP_CONTENT_DIR . '/php-error.php';
if ( is_readable( $php_error_pluggable ) ) {
require_once $php_error_pluggable;
return;
}
}
// Otherwise, display the default error template.
$this->display_default_error_template( $error, $handled );
}
/**
* Displays the default PHP error template.
*
* This method is called conditionally if no 'php-error.php' drop-in is available.
*
* It calls {@see wp_die()} with a message indicating that the site is experiencing technical difficulties and a
* login link to the admin backend. The {@see 'wp_php_error_message'} and {@see 'wp_php_error_args'} filters can
* be used to modify these parameters.
*
* @since 5.2.0
* @since 5.3.0 The `$handled` parameter was added.
*
* @param array $error Error information retrieved from `error_get_last()`.
* @param true|WP_Error $handled Whether Recovery Mode handled the fatal error.
*/
protected function display_default_error_template( $error, $handled ) {
if ( ! function_exists( '__' ) ) {
wp_load_translations_early();
}
if ( ! function_exists( 'wp_die' ) ) {
require_once ABSPATH . WPINC . '/functions.php';
}
if ( ! class_exists( 'WP_Error' ) ) {
require_once ABSPATH . WPINC . '/class-wp-error.php';
}
if ( true === $handled && wp_is_recovery_mode() ) {
$message = __( 'There has been a critical error on this website, putting it in recovery mode. Please check the Themes and Plugins screens for more details. If you just installed or updated a theme or plugin, check the relevant page for that first.' );
} elseif ( is_protected_endpoint() && wp_recovery_mode()->is_initialized() ) {
$message = __( 'There has been a critical error on this website. Please check your site admin email inbox for instructions.' );
} else {
$message = __( 'There has been a critical error on this website.' );
}
$message = sprintf(
'%s
%s
',
$message,
/* translators: Documentation about troubleshooting. */
__( 'https://wordpress.org/support/article/faq-troubleshooting/' ),
__( 'Learn more about troubleshooting WordPress.' )
);
$args = array(
'response' => 500,
'exit' => false,
);
/**
* Filters the message that the default PHP error template displays.
*
* @since 5.2.0
*
* @param string $message HTML error message to display.
* @param array $error Error information retrieved from `error_get_last()`.
*/
$message = apply_filters( 'wp_php_error_message', $message, $error );
/**
* Filters the arguments passed to {@see wp_die()} for the default PHP error template.
*
* @since 5.2.0
*
* @param array $args Associative array of arguments passed to `wp_die()`. By default these contain a
* 'response' key, and optionally 'link_url' and 'link_text' keys.
* @param array $error Error information retrieved from `error_get_last()`.
*/
$args = apply_filters( 'wp_php_error_args', $args, $error );
$wp_error = new WP_Error(
'internal_server_error',
$message,
array(
'error' => $error,
)
);
wp_die( $wp_error, '', $args );
}
}
Fatal error: Uncaught Error: Class 'WP_Fatal_Error_Handler' not found in /home/danestany/public_html/wp-includes/error-protection.php:92
Stack trace:
#0 /home/danestany/public_html/wp-settings.php(64): wp_register_fatal_error_handler()
#1 /home/danestany/public_html/wp-config.php(98): require_once('/home/danestany...')
#2 /home/danestany/public_html/wp-load.php(50): require_once('/home/danestany...')
#3 /home/danestany/public_html/wp-blog-header.php(13): require_once('/home/danestany...')
#4 /home/danestany/public_html/index.php(17): require('/home/danestany...')
#5 {main}
thrown in /home/danestany/public_html/wp-includes/error-protection.php on line 92