WordPress.org

Make WordPress Core

Ticket #9639: 9639.diff

File 9639.diff, 773 bytes (added by jacobsantos, 4 years ago)

Fix PHP deprecated notices based off of 2.7.1 tag.

  • 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); 
     22// Unicode Extension is in PHP 6.0 only or do version check when this changes. 
     23if ( function_exists('unicode_decode') ) 
     24        error_reporting( E_ALL ^ E_DEPRECATED ^ E_NOTICE ^ E_USER_NOTICE ^ E_STRICT ); 
     25else if ( defined( 'E_DEPRECATED' ) ) // Introduced in PHP 5.3 
     26        error_reporting( E_ALL ^ E_DEPRECATED ^ E_NOTICE ^ E_USER_NOTICE ); 
     27else 
     28        error_reporting(E_ALL ^ E_NOTICE ^ E_USER_NOTICE); 
    2329 
    2430if ( file_exists( ABSPATH . 'wp-config.php') ) { 
    2531