When WP_DEBUG, set PHP error_reporting level to E_ALL. This will include E_DEPRECATED in PHP 5.3, and E_STRICT in PHP 5.4.
fixes #24357. git-svn-id: http://core.svn.wordpress.org/trunk@24288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8471b20a11
commit
316bfc63a2
|
@ -258,12 +258,7 @@ function timer_stop( $display = 0, $precision = 3 ) { // if called like timer_st
|
||||||
*/
|
*/
|
||||||
function wp_debug_mode() {
|
function wp_debug_mode() {
|
||||||
if ( WP_DEBUG ) {
|
if ( WP_DEBUG ) {
|
||||||
// E_DEPRECATED is a core PHP constant in PHP 5.3. Don't define this yourself.
|
error_reporting( E_ALL );
|
||||||
// The two statements are equivalent, just one is for 5.3+ and for less than 5.3.
|
|
||||||
if ( defined( 'E_DEPRECATED' ) )
|
|
||||||
error_reporting( E_ALL & ~E_DEPRECATED & ~E_STRICT );
|
|
||||||
else
|
|
||||||
error_reporting( E_ALL );
|
|
||||||
|
|
||||||
if ( WP_DEBUG_DISPLAY )
|
if ( WP_DEBUG_DISPLAY )
|
||||||
ini_set( 'display_errors', 1 );
|
ini_set( 'display_errors', 1 );
|
||||||
|
|
Loading…
Reference in New Issue