sentry-php
sentry-php copied to clipboard
Stack traces are missing variadic and not declared arguments
How do you use Sentry?
Self-hosted / on-premises
SDK version
4.0.1
Steps to reproduce
- Create function with variadic parameters or without parameters. Ex.:
function variadic(...$params) {...}
function noParams() {...}
- Call this function with some arguments.
- Throw an exception inside that function.
Expected result
Sentry shows all passed arguments in stack trace.
Actual result
Sentry shows only first argument for variadic function and no arguments for function without parameters. With this code:
function variadic(...$params)
{
noParams($params);
}
function noParams()
{
throw new \Exception();
}
Artisan::command('debug', function () {
variadic('a', 1, [123]);
});
I get this stack trace in Sentry: