diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 1e56a2b6e8..9332ca080a 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -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) diff --git a/framework/web/Session.php b/framework/web/Session.php index b59c47995a..4c0c9e537b 100644 --- a/framework/web/Session.php +++ b/framework/web/Session.php @@ -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']); }