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

Conversation

@zluiten
Copy link
Contributor

@zluiten zluiten commented Jun 18, 2016

If read returns anything else than a string it will fail with PHP Catchable fatal error: session_regenerate_id(): Failed to create(read) session ID: user.
PHP 7 requires that reading always returns a string, regardless the existence of data.
Fixes #35.

Might cover #41 as well.

$cacheStorage->getItem('242')->willReturn(null);
$this->usedSaveHandlers[] = $saveHandler = new Cache($cacheStorage->reveal());

$id = '242';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be no quote?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the session handler interface defines strings (session id).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, but the tests is not proving the (string) cast then, as 242 must be string, and 242 is not string.

Copy link
Contributor Author

@zluiten zluiten Jun 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Casting is not necessary. It is a string because of the quotes (is_string('242') === true). The contents of the string is not of importance here.

@zluiten zluiten mentioned this pull request Jun 20, 2016
@zluiten zluiten closed this Jun 20, 2016
weierophinney added a commit that referenced this pull request Jun 24, 2016
Close #46
Close #44
Fixes #35
Fixes #36
Fixes #41
Fixes #42
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