wp_should_handle_php_error

FILTER wp-includes\class-wp-fatal-error-handler.php (ligne 125) github
Filters whether a given thrown error should be handled by the fatal error handler. 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.

Paramètres

Entrée :
false, $error
Sortie :
@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()`.

Utilisation

// Modifier la valeur avec le filtre 'wp_should_handle_php_error'
add_filter('wp_should_handle_php_error', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre(false) {
    // Modifier la valeur
    return false;
}

Actualités

Chargement des actualités...