mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 13:02:24 +08:00
Fix #17843: Fix yii\web\Session::setCookieParamsInternal check param "samesite"
This commit is contained in:
@ -4,6 +4,7 @@ Yii Framework 2 Change Log
|
||||
2.0.33 under development
|
||||
------------------------
|
||||
|
||||
- Bug #17843: Fix `yii\web\Session::setCookieParamsInternal` check param "samesite" (schevgeny)
|
||||
- Bug #17828: Fix `yii\web\UploadedFile::saveAs()` failing when error value in `$_FILES` entry is a string (haveyaseen)
|
||||
- Bug #17829: `yii\helpers\ArrayHelper::filter` now correctly filters data when passing a filter with more than 2 levels (rhertogh)
|
||||
|
||||
|
||||
@ -398,8 +398,8 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
|
||||
if (PHP_VERSION_ID >= 70300) {
|
||||
session_set_cookie_params($data);
|
||||
} else {
|
||||
if (!empty($data['sameSite'])) {
|
||||
throw new InvalidConfigException('sameSite cookie is not supported by PHP versions < 7.3.0 (set it to null in this environment)');
|
||||
if (!empty($data['samesite'])) {
|
||||
throw new InvalidConfigException('samesite cookie is not supported by PHP versions < 7.3.0 (set it to null in this environment)');
|
||||
}
|
||||
session_set_cookie_params($data['lifetime'], $data['path'], $data['domain'], $data['secure'], $data['httponly']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user