Skip to content

Fix error when no clientIp exists #565

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 8 commits into from
Oct 11, 2021

Conversation

alexander-schranz
Copy link
Contributor

@alexander-schranz alexander-schranz commented Oct 10, 2021

The getClientIP() can return null and so it will error when using createFromUserIpAddress instead we creating an instance manually and use the nullable setIpAddress method.

Copy link
Contributor

@ste93cry ste93cry left a comment

Choose a reason for hiding this comment

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

Can you please add a CHANGELOG entry referring this PR and a new test case to the RequestListenerTest::handleKernelRequestEventForSymfonyVersionAtLeast43DataProvider() method to prevent a possible regression in the future?

Co-authored-by: Stefano Arlandini <[email protected]>
@alexander-schranz
Copy link
Contributor Author

PR updated.

@ste93cry
Copy link
Contributor

The PHP 7.3 build with Symfony 4.4 is failing due to the usage of a wrong constant, the rest looks good

@alexander-schranz
Copy link
Contributor Author

Thx I updated i from main to master request.

Copy link
Contributor

@ste93cry ste93cry left a comment

Choose a reason for hiding this comment

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

Thank you for the patience to contribute 💪

@ste93cry ste93cry merged commit b013a88 into getsentry:master Oct 11, 2021
@alexander-schranz alexander-schranz deleted the bugfix/user-data branch October 11, 2021 13:56
@alexander-schranz
Copy link
Contributor Author

Thx for merging. Do you know if there is any release planned?

@ste93cry
Copy link
Contributor

There is no plan, we release new versions as needed. I think that a good ETA for the next patch could be the next week as I have one more thing that I would like to fix before

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.

3 participants