Skip to content

fix: setContents() does not toggle modified flag #15

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
Feb 14, 2023
Merged

fix: setContents() does not toggle modified flag #15

merged 1 commit into from
Feb 14, 2023

Conversation

FabienYt
Copy link
Contributor

No description provided.

@compwright
Copy link
Owner

@FabienYt thank you for your contribution! Could you elaborate on how this is helpful, and what your use case is?

@FabienYt
Copy link
Contributor Author

I use your project as a basis for session management.

From Session, I added some features like an anti-csrf or a clear() method.
The clear() method clears the entire content of the session ($this->session->setContents([]);) but the session is not necessarily modified before and isModified() return false.

In Manager.php, content modification isn't detected and aren't saved (L85 or L481) and LazyWrite enable.

@compwright compwright changed the title Fix modified var for setContents() method fix: setContents() does not toggle modified flag Feb 14, 2023
@compwright compwright merged commit 14395fe into compwright:master Feb 14, 2023
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