I am writing some custom template logic for WordPress (which isn't really relevant, just for context). WordPress has a function wp_debug_backtrace_summary which basically just summarizes information from the stack trace.
The issue is that I'm getting a warning based on the 'args' argument not always being defined. While this looks like this is a known WordPress bug (31215), what I don't understand is why args is sometimes not defined.
The issue only arrises when my custom logic which uses output buffering to pre-render some template parts before rendering the whole template.
The PHP docs seem to imply that the args parameter should always be defined, and I haven't been able to find a lot that speaks to this issue.
Any help from PHP experts would be appreciated.