diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index ea61588541..957d51d8e0 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -84,6 +84,7 @@ Yii Framework 2 Change Log - Enh #10158: Added the possibility to specify CSS and Javascript options per file in `\yii\web\AssetBundle` (machour) - Enh #10170: `Yii::powered()` now uses `Yii::t()` (SamMousa) - Enh #10218: Support for selecting multiple filter values with the same name was added to `yii.gridView.js` (omnilight, silverfire) +- Enh #10255: Added Yii warning to session initialization if session was already started (AnatolyRugalev) - Enh #10264: Generation of HTML tags in Yii's JavaScript now uses jQuery style (silverfire) - Enh #10267: `yii.js` - added original event passing to `pjaxOptions` for links with `data-method` and `data-pjax` (servocoder, silverfire) - Enh #10319: `yii\helpers\VarDumper::dump()` now respects PHP magic method `__debugInfo()` (klimov-paul) diff --git a/framework/web/Session.php b/framework/web/Session.php index ce18ac3a03..0e604f6b7a 100644 --- a/framework/web/Session.php +++ b/framework/web/Session.php @@ -97,6 +97,9 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co { parent::init(); register_shutdown_function([$this, 'close']); + if ($this->getIsActive()) { + Yii::warning("Session is already started", __METHOD__); + } } /**