WordPress.org

Make WordPress Core

Ticket #8701: 8701.4.diff

File 8701.4.diff, 1.6 KB (added by Denis-de-Bernardy, 6 years ago)

See: http://fr2.php.net/manual/en/errorfunc.constants.php

  • wp-load.php

     
    1919/** Define ABSPATH as this files directory */ 
    2020define( 'ABSPATH', dirname(__FILE__) . '/' ); 
    2121 
    22 error_reporting(E_ALL ^ E_NOTICE ^ E_USER_NOTICE); 
     22if ( defined('E_RECOVERABLE_ERROR') ) 
     23        error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR); 
     24else 
     25        error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING); 
    2326 
    2427if ( file_exists( ABSPATH . 'wp-config.php') ) { 
    2528 
  • wp-settings.php

     
    201201if (defined('WP_DEBUG') and WP_DEBUG == true) { 
    202202        error_reporting(E_ALL); 
    203203} else { 
    204         // Unicode Extension is in PHP 6.0 only or do version check when this changes. 
    205         if ( function_exists('unicode_decode') ) 
    206                 error_reporting( E_ALL ^ E_DEPRECATED ^ E_NOTICE ^ E_USER_NOTICE ^ E_STRICT ); 
    207         else if ( defined( 'E_DEPRECATED' ) ) // Introduced in PHP 5.3 
    208                 error_reporting( E_ALL ^ E_DEPRECATED ^ E_NOTICE ^ E_USER_NOTICE ); 
     204        if ( defined('E_RECOVERABLE_ERROR') ) 
     205                error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR); 
    209206        else 
    210                 error_reporting(E_ALL ^ E_NOTICE ^ E_USER_NOTICE); 
     207                error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING); 
    211208} 
    212209 
    213210// For an advanced caching plugin to use, static because you would only want one