diff --git src/wp-includes/load.php src/wp-includes/load.php
index e413803e48..2fb5fc5fdd 100644
|
|
|
function wp_debug_mode() { |
| 328 | 328 | error_reporting( E_ALL ); |
| 329 | 329 | |
| 330 | 330 | if ( WP_DEBUG_DISPLAY ) { |
| 331 | | ini_set( 'display_errors', 1 ); |
| | 331 | |
| | 332 | if ( function_exists( 'ini_set' ) ) { |
| | 333 | ini_set( 'display_errors', 1 ); |
| | 334 | } |
| | 335 | |
| 332 | 336 | } elseif ( null !== WP_DEBUG_DISPLAY ) { |
| 333 | | ini_set( 'display_errors', 0 ); |
| | 337 | if ( function_exists( 'ini_set' ) ) { |
| | 338 | ini_set( 'display_errors', 0 ); |
| | 339 | } |
| | 340 | |
| 334 | 341 | } |
| 335 | 342 | |
| 336 | 343 | if ( in_array( strtolower( (string) WP_DEBUG_LOG ), array( 'true', '1' ), true ) ) { |
| … |
… |
function wp_debug_mode() { |
| 342 | 349 | } |
| 343 | 350 | |
| 344 | 351 | if ( $log_path ) { |
| 345 | | ini_set( 'log_errors', 1 ); |
| 346 | | ini_set( 'error_log', $log_path ); |
| | 352 | |
| | 353 | if ( function_exists( 'ini_set' ) ) { |
| | 354 | ini_set( 'log_errors', 1 ); |
| | 355 | ini_set( 'error_log', $log_path ); |
| | 356 | } |
| | 357 | |
| 347 | 358 | } |
| 348 | 359 | } else { |
| 349 | 360 | 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 ); |
| 350 | 361 | } |
| 351 | 362 | |
| 352 | 363 | if ( defined( 'XMLRPC_REQUEST' ) || defined( 'REST_REQUEST' ) || ( defined( 'WP_INSTALLING' ) && WP_INSTALLING ) || wp_doing_ajax() || wp_is_json_request() ) { |
| 353 | | ini_set( 'display_errors', 0 ); |
| | 364 | |
| | 365 | if ( function_exists( 'ini_set' ) ) { |
| | 366 | ini_set( 'display_errors', 0 ); |
| | 367 | } |
| | 368 | |
| 354 | 369 | } |
| 355 | 370 | } |
| 356 | 371 | |