Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Ensure $request->hasSession() is always checked before calling getSession()#32703
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nicolas-grekas commentedJul 24, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Any reason why you're proposing this? |
Arman-Hosseini commentedJul 24, 2019
@nicolas-grekas |
fabpot commentedJul 27, 2019
We do not change code that works. We did such refactoring in the past and that introduced some bugs. So, we either refactor to fix a bug or we keep the current code. |
nicolas-grekas left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I rebased this PR for 4.4 and reviewed the full code base to ensure we don't call getSession without checking hasSession before, as it is required now (getSession throws in 5.0 instead of returning null)
Uh oh!
There was an error while loading.Please reload this page.
Arman-Hosseini commentedJul 27, 2019
@nicolas-grekas thank you. |
xabbuh left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
looks like some tests are failing
chalasr commentedJul 28, 2019
@xabbuh fixed, thanks |
nicolas-grekas commentedJul 30, 2019
Thank you@Arman-Hosseini. |
…ling getSession() (Arman-Hosseini)This PR was merged into the 4.4 branch.Discussion----------Ensure $request->hasSession() is always checked before calling getSession()| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR | -Commits-------7b2c326 Ensure $request->hasSession() is always checked before calling getSession()
Uh oh!
There was an error while loading.Please reload this page.