Make WordPress Core


Ignore:
Timestamp:
03/10/2018 05:30:12 PM (6 years ago)
Author:
SergeyBiryukov
Message:

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

Props paulschreiber.
Fixes #31215.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r42820 r42824  
    54115411                $caller[] = "{$call['function']}('{$call['args'][0]}')";
    54125412            } elseif ( in_array( $call['function'], array( 'include', 'include_once', 'require', 'require_once' ) ) ) {
    5413                 $caller[] = $call['function'] . "('" . str_replace( $truncate_paths, '', wp_normalize_path( $call['args'][0] ) ) . "')";
     5413                $filename = isset( $call['args'][0] ) ? $call['args'][0] : '';
     5414                $caller[] = $call['function'] . "('" . str_replace( $truncate_paths, '', wp_normalize_path( $filename ) ) . "')";
    54145415            } else {
    54155416                $caller[] = $call['function'];
Note: See TracChangeset for help on using the changeset viewer.