-
-
Notifications
You must be signed in to change notification settings - Fork 452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stack traces are missing variadic and not declared arguments #1645
Comments
I believe the culprit is |
Also, |
I haven't tested this yet, but how are variadic parameters reflected in a native stack trace? |
All ways to pass parameters to function look the same way in PHP 7.4. Functions' code: function regularParams(string $s, int $i, array $a)
{
variadic($s, $i, $a);
}
function variadic(...$params)
{
noParams(...$params);
}
function noParams()
{
throw new \Exception();
}
Artisan::command('debug', function () {
try {
regularParams('a', 1, [123]);
} catch (\Throwable $e) {
var_dump(array_slice($e->getTrace(), 0, 3));
}
});
|
We use the |
Oh, if you are okay with just having the values, sure, please open a PR (including tests 😬). |
The variadic parameter has a name, |
How do you use Sentry?
Self-hosted / on-premises
SDK version
4.0.1
Steps to reproduce
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:
I get this stack trace in Sentry:
The text was updated successfully, but these errors were encountered: