From 8bab745586e464f1256f90deb2c635859a5f171d Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 10 Mar 2018 17:31:32 +0000 Subject: [PATCH] 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 --- wp-includes/functions.php | 3 ++- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 533894bc77..99722d1c7f 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -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']; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 9bf65c40ea..5bb0f92f6b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.