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

Fix session bug when the request is ajax call #2697

Merged
merged 1 commit into from
Mar 13, 2020

Conversation

michalsn
Copy link
Member

Description
When the session is initialized during ajax request and we use get(null) or get(key) with an empty $_SESSION variable, we always get the empty array as a result.

This pull request fixes it, so now we receive accordingly:

  • empty array for get(null) call
  • null for get(key) call

This is a very rare use case scenario.

Checklist:

  • Securely signed commits
  • Component(s) with PHPdocs
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@michalsn michalsn changed the title fix session bug Fix session bug when the request is ajax call Mar 12, 2020
@MGatner MGatner merged commit 9506609 into codeigniter4:develop Mar 13, 2020
@michalsn michalsn deleted the session_bug branch May 4, 2020 10:03
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

Successfully merging this pull request may close these issues.

2 participants