Skip to content

SessionExtension: don't set readAndClose if null #213

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
Mar 18, 2023
Merged

Conversation

mabar
Copy link
Contributor

@mabar mabar commented Aug 8, 2022

Session class throws exception if session is started and option read_and_close is set.

http/src/Http/Session.php

Lines 401 to 404 in 0679e7c

if (array_key_exists('read_and_close', $normalized)) {
if (session_status() === PHP_SESSION_ACTIVE) {
throw new Nette\InvalidStateException('Cannot configure "read_and_close" for already started session.');
}

SessionExtension breaks compatibility with other session implementations (in case they already started the session) by always setting that option (to default value).

'readAndClose' => Expect::bool(),

Session class throws exception if session is started and option read_and_close is set.
SessionExtension breaks compatibility with other session implementations (in case they already started the session) by always setting that option (to default value).
@dg dg force-pushed the master branch 3 times, most recently from 59f402a to 32af756 Compare October 13, 2022 01:29
@dg dg force-pushed the master branch 12 times, most recently from ba7eba8 to 7774190 Compare November 30, 2022 17:29
@dg dg force-pushed the master branch 2 times, most recently from c6e0524 to 788ddc4 Compare December 5, 2022 00:09
@dg dg force-pushed the master branch 2 times, most recently from 0f24022 to ebdb825 Compare January 15, 2023 17:08
@dg dg force-pushed the master branch 7 times, most recently from 684be2b to 2a0c595 Compare January 24, 2023 19:09
@dg
Copy link
Member

dg commented Mar 18, 2023

Thanks

@dg dg merged commit ed3dc95 into nette:master Mar 18, 2023
@mabar mabar deleted the patch-2 branch March 18, 2023 14:42
dg pushed a commit that referenced this pull request Mar 18, 2023
Session class throws exception if session is started and option read_and_close is set.
SessionExtension breaks compatibility with other session implementations (in case they already started the session) by always setting that option (to default value).
dg pushed a commit that referenced this pull request Mar 18, 2023
Session class throws exception if session is started and option read_and_close is set.
SessionExtension breaks compatibility with other session implementations (in case they already started the session) by always setting that option (to default value).
dg pushed a commit that referenced this pull request Mar 18, 2023
Session class throws exception if session is started and option read_and_close is set.
SessionExtension breaks compatibility with other session implementations (in case they already started the session) by always setting that option (to default value).
dg pushed a commit that referenced this pull request Mar 18, 2023
Session class throws exception if session is started and option read_and_close is set.
SessionExtension breaks compatibility with other session implementations (in case they already started the session) by always setting that option (to default value).
dg pushed a commit that referenced this pull request Mar 18, 2023
Session class throws exception if session is started and option read_and_close is set.
SessionExtension breaks compatibility with other session implementations (in case they already started the session) by always setting that option (to default value).
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