Merge pull request #10395 from AnatolyRugalev/issue-10255

Added warning to session component initialization
This commit is contained in:
Dmitry Naumenko
2015-12-26 10:33:56 +02:00
2 changed files with 4 additions and 0 deletions

View File

@@ -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)

View File

@@ -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__);
}
}
/**