General: In `wp_debug_backtrace_summary()`, check if `$call['args']` is defined to avoid a PHP notice.

Props paulschreiber.
Fixes #31215.
Built from https://develop.svn.wordpress.org/trunk@42824


git-svn-id: http://core.svn.wordpress.org/trunk@42654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2018-03-10 17:31:32 +00:00
parent ba7b8cd8a0
commit 8bab745586
2 changed files with 3 additions and 2 deletions

View File

@ -5410,7 +5410,8 @@ function wp_debug_backtrace_summary( $ignore_class = null, $skip_frames = 0, $pr
if ( in_array( $call['function'], array( 'do_action', 'apply_filters', 'do_action_ref_array', 'apply_filters_ref_array' ) ) ) {
$caller[] = "{$call['function']}('{$call['args'][0]}')";
} elseif ( in_array( $call['function'], array( 'include', 'include_once', 'require', 'require_once' ) ) ) {
$caller[] = $call['function'] . "('" . str_replace( $truncate_paths, '', wp_normalize_path( $call['args'][0] ) ) . "')";
$filename = isset( $call['args'][0] ) ? $call['args'][0] : '';
$caller[] = $call['function'] . "('" . str_replace( $truncate_paths, '', wp_normalize_path( $filename ) ) . "')";
} else {
$caller[] = $call['function'];
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-42823';
$wp_version = '5.0-alpha-42824';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.