Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Security/Http] Remove unnecessary null check #37339

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 1 commit into from
Jun 18, 2020

Conversation

scheb
Copy link
Contributor

@scheb scheb commented Jun 18, 2020

Q A
Branch? 5.1
Bug fix? no
New feature? no
Deprecations? no
Tickets n/a
License MIT
Doc PR n/a

Just found this piece of code, it checks if $this->eventDispatcher is null, but actually it cannot be null. The constructor argument is non-nullable and a few lines further up it is used without the null check. So I'd recommend to remove the statement.

@nicolas-grekas nicolas-grekas changed the title Remove unnecessary null check [Security/Http] Remove unnecessary null check Jun 18, 2020
@nicolas-grekas
Copy link
Member

Thank you @scheb.

@nicolas-grekas nicolas-grekas merged commit 6e09f92 into symfony:5.1 Jun 18, 2020
@scheb scheb deleted the remove-null-check branch December 28, 2020 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.