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

Props paulschreiber.
Fixes #31215.

git-svn-id: https://develop.svn.wordpress.org/trunk@42824 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2018-03-10 17:30:12 +00:00
parent 75bf3a3d15
commit 53fcfd87ac

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'];
}