Make WordPress Core


Ignore:
Timestamp:
04/17/2019 11:03:03 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Bootstrap/Load: Only send the recovery mode email if the error occurs on a protected endpoint.

This reduces the potential email noise to places where the fatal error could be interfering with the login and admin experience.

Once the user is in recovery mode, any fatal errors (even if they aren't in a protected endpoint) are handled and the plugin or theme will be paused.

Props TimothyBlynJacobs.
See #46950.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-recovery-mode.php

    r45211 r45238  
    174174
    175175        if ( ! $this->is_active() ) {
     176            if ( ! is_protected_endpoint() ) {
     177                return new WP_Error( 'non_protected_endpoint', __( 'Error occurred on a non-protected endpoint.' ) );
     178            }
     179
    176180            if ( ! function_exists( 'wp_generate_password' ) ) {
    177181                require_once ABSPATH . WPINC . '/pluggable.php';
Note: See TracChangeset for help on using the changeset viewer.