Skip to content
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

Monolog handler fails when the extra data has numeric array keys #833

Closed
pontus-mp opened this issue Jun 13, 2019 · 2 comments
Closed

Monolog handler fails when the extra data has numeric array keys #833

pontus-mp opened this issue Jun 13, 2019 · 2 comments
Milestone

Comments

@pontus-mp
Copy link
Contributor

If $key is an integer in the following line, the function call will fail with Uncaught TypeError: Argument 1 passed to Sentry\State\Scope::setExtra() must be of the type string, integer given.

$scope->setExtra($key, $value);

I suggest adding a cast to string there, or possibly making the first argument to setExtra more relaxed.

@ste93cry
Copy link
Collaborator

Good catch! I don't have an example in mind of why the $key should not be a string, so I would say that casting is the best solution here. Are you willing to open a PR to fix it?

@pontus-mp
Copy link
Contributor Author

Sure, done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants