Skip to content

Allow explicit null value for dsn configuration option #457

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

Merged
merged 3 commits into from
Mar 3, 2021

Conversation

bobvandevijver
Copy link
Contributor

The fix in #454 missed this particular line: when the dsn configuration option was set to null, it was still not forwarded to the actual Sentry options.

Setting it to an empty string does work in 4.0.2, so that can be used as temporary workaround.

@bobvandevijver bobvandevijver force-pushed the patch-1 branch 2 times, most recently from 3082cfa to 0cd738a Compare March 3, 2021 14:58
Copy link
Contributor

@Jean85 Jean85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow! Thank you for the very quick report and fix!

We should require tests here then, to avoid another regression on this issue... Can you provide them? Otherwise I'm happy to take over.

@bobvandevijver
Copy link
Contributor Author

@Jean85 I tried to make something fitting. I added tests for three supported falsy values (according to the https://github.com/getsentry/sentry-php/blob/master/src/Options.php#L822). Both the '' and false values pass without my fix, but the null check fails. But, they all pass with the small fix in this PR 👍🏻

Copy link
Contributor

@Jean85 Jean85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a changelog entry, thank you!

@Jean85 Jean85 merged commit cc73694 into getsentry:master Mar 3, 2021
@bobvandevijver bobvandevijver deleted the patch-1 branch March 3, 2021 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Explicit null dsn no longer disables Sentry
2 participants