WordPress.org

Make WordPress Core

Ticket #36708: 36708.2.patch

File 36708.2.patch, 683 bytes (added by avagoldin, 5 years ago)

Added WP_DEBUG check.

  • src/wp-includes/load.php

    diff --git src/wp-includes/load.php src/wp-includes/load.php
    index 780613f..0ca54bf 100644
    function wp_debug_mode() { 
    301301                error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
    302302        }
    303303
    304         if ( defined( 'XMLRPC_REQUEST' ) || defined( 'REST_REQUEST' ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
    305                 ini_set( 'display_errors', 0 );
     304        if ( ! WP_DEBUG && ( defined( 'XMLRPC_REQUEST' ) || defined( 'REST_REQUEST' ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) ) {
     305                @ini_set( 'display_errors', 0 );
    306306        }
    307307}
    308308