Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Add __destruct to SessionManager #3429

Closed
wants to merge 1 commit into from
Closed

Add __destruct to SessionManager #3429

wants to merge 1 commit into from

Conversation

mwillbanks
Copy link
Contributor

Overview

Adds a __destruct method into the SessionManager to ensure that writeClose is called prior to PHP destroying the object references from a session becoming closed. When the destructor is called it will then call writeClose; in the event that writeClose was already called the storage would then be marked as Immutable. Therefore writeClose now additionally checks to ensure that if the storage is immutable it will not execute the closing again.

This issue happens primarily when utilizing a database storage handler or something that rewrite other resources.

Issues Resolved

#2628
#3075
#3108
#3182

…ose, writeClose now checks to see if the storage is immutable prior to attempting to save since the destructor may call writeClose a second time
@ghost ghost assigned weierophinney Jan 14, 2013
weierophinney added a commit that referenced this pull request Jan 14, 2013
weierophinney added a commit to zendframework/zend-session that referenced this pull request May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants