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

This commit is contained in:
Carsten Brandt
2024-12-07 08:19:25 +01:00
committed by GitHub
parent 65e3369e16
commit dc05f31100
2 changed files with 4 additions and 1 deletions

View File

@ -145,7 +145,9 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
$this->registerSessionHandler();
$this->setCookieParamsInternal();
if ($this->getUseCookies() !== false) {
$this->setCookieParamsInternal();
}
YII_DEBUG ? session_start() : @session_start();