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

Session Container Mismatch & Version Compare fixes for 5.3.3 #3713

Closed
wants to merge 2 commits into from
Closed

Session Container Mismatch & Version Compare fixes for 5.3.3 #3713

wants to merge 2 commits into from

Conversation

mwillbanks
Copy link
Contributor

Overview

The changes with the new Zend\Stdlib\ArrayObject caused an overall break in Zend\Session\Container when the code was not tested in isolation (meaning there was previous Containers in the session). This is because they were of type \ArrayObject causing an object mismatch; in general the logic was flawed because we should only care if it is Traversable since the main contract is pretty much an array. Overall this causes an upgrade issue for people upgrading on production. The current workaround is to remove all sessions.

Secondly; Zend\Stdlib\ArrayObject and friends that provide functionality for 5.3.4+ accidentally matches builds from distribution patch fixes; for example:
var_dump(version_compare('5.3.3-7+squeeze14', '5.3.3'))
int(1)
When you'd likely expect it to be of int(0). To solve this version compare must be made against the higher version:
var_dump(version_compare('5.3.3-7+squeeze14', '5.3.4'))
int(-1)

Mike Willbanks added 2 commits February 7, 2013 07:14
@mwillbanks
Copy link
Contributor Author

@mwillbanks
Copy link
Contributor Author

This PR will close #3700

@ghost ghost assigned weierophinney Feb 7, 2013
weierophinney added a commit that referenced this pull request Feb 7, 2013
weierophinney added a commit to zendframework/zend-stdlib that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-stdlib that referenced this pull request May 15, 2015
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 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.

2 participants