WordPress.org

Make WordPress Core

Ticket #8701: 8701.2.diff

File 8701.2.diff, 693 bytes (added by jacobsantos, 9 years ago)

Correct fix for E_STRICT on PHP < 5.3 and check for E_DEPRECATED ON PHP 5.3.0+

  • wp-settings.php

     
    199199if (defined('WP_DEBUG') and WP_DEBUG == true) {
    200200        error_reporting(E_ALL);
    201201} else {
    202         error_reporting(E_ALL ^ E_NOTICE ^ E_USER_NOTICE);
     202        if ( defined( 'E_DEPRECATED' ) )
     203                error_reporting(E_ALL ^ E_NOTICE ^ E_USER_NOTICE ^ ~E_STRICT ^ E_DEPRECATED);
     204        else if ( defined( 'E_STRICT' ) )
     205                error_reporting(E_ALL ^ E_NOTICE ^ E_USER_NOTICE ^ ~E_STRICT);
     206        else
     207                error_reporting(E_ALL ^ E_NOTICE ^ E_USER_NOTICE);
    203208}
    204209
    205210// For an advanced caching plugin to use, static because you would only want one