Session Metadata and SessionArrayStorage requestaccesstime fixes. #3639

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants
@mwillbanks
Contributor

mwillbanks commented Jan 31, 2013

Overview

2.1 changed slightly in how the session manager retrieved results from the storage; unfortunately this caused the meta data to be blown away. Unfortunately in 2.0.x it was not clear that the type cast was working around the toArray method. Now toArray has a $metaData = false parameter to ensure that we can save the metadata when writing the session.

Additionally the Storage containers were never meant to directly modify $_SESSION; however, to fix issues with storage containers from ArrayObject this was made. Unfortunately when it is initialized it attempts to set the request access time; this has been changed to do it on session start by utilizing the fromArray method.

Added default variable to interface for metadata from toArray, fixed …
…issue with SessionArrayStorage to repopulate when session starts fixing request access time
library/Zend/Session/SessionManager.php
@@ -103,7 +103,10 @@ public function start($preserveStorage = false)
$storage->fromArray($_SESSION);
}
$_SESSION = $storage;
+ } else if ($storage instanceof Storage\SessionArrayStorage) {

This comment has been minimized.

@Maks3w

Maks3w Feb 1, 2013

Member

According PSR-2 this must be elseif

@Maks3w

Maks3w Feb 1, 2013

Member

According PSR-2 this must be elseif

@ghost ghost assigned weierophinney Feb 5, 2013

weierophinney added a commit that referenced this pull request Feb 5, 2013

weierophinney added a commit to zendframework/zend-session that referenced this pull request May 15, 2015

weierophinney added a commit to zendframework/zend-session that referenced this pull request May 15, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment