Skip to content
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

Fix #20292: Fix \yii\web\Session should not set cookie params, when useCookie is false #20293

Merged
merged 1 commit into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions framework/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Yii Framework 2 Change Log
2.0.52 under development
------------------------

- Bug #20292: Fix `\yii\web\Session` should not set cookie params, when useCookie is false (cebe)
- Bug #20232: Fix regression introduced in `GHSA-cjcc-p67m-7qxm` while attaching behavior defined by `__class` array key (erickskrauch)
- Bug #20231: Fix regression introduced in #20167 in `yii\validators\FileValidator` (bizley)
- Enh #20247: Support for variadic console controller action methods (brandonkelly)
Expand Down
4 changes: 3 additions & 1 deletion framework/web/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ public function open()

$this->registerSessionHandler();

$this->setCookieParamsInternal();
if ($this->getUseCookies() !== false) {
$this->setCookieParamsInternal();
}

YII_DEBUG ? session_start() : @session_start();

Expand Down
Loading