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

Error when setting user context since 1.6.0: array_merge(): Argument #2 is not an array #389

Closed
tremby opened this issue Dec 14, 2016 · 3 comments

Comments

@tremby
Copy link

tremby commented Dec 14, 2016

Since #387 I get an error when setting the user context.

The monolog RavenHandler stores $previousUserContext which in my app ends up being null (rather than its initial value of false). This happens when RavenHandler sets it to the value of $this->ravenClient->context->user, which at this point is null.

It then calls user_context (see https://github.com/Seldaek/monolog/blob/1.22.0/src/Monolog/Handler/RavenHandler.php#L189 which is the latest release right now -- current master has slightly different code but the same issue) with that null in the $data, which is not an array, hence the error.

I don't know if this is a bug with sentry-php or with the monolog RavenHandler, but it's the recent change in behaviour which is causing the error.

@ianfp
Copy link

ianfp commented Dec 14, 2016

Dup of #388, I believe.

@dcramer
Copy link
Member

dcramer commented Dec 14, 2016

Yep, should be fixed in 1.6.1

@dcramer dcramer closed this as completed Dec 14, 2016
@tremby
Copy link
Author

tremby commented Dec 14, 2016

Oh wow, reported just as I typed mine. Thanks!

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