Browse Source

moved CacheSession::init() parent call after init of cache component

session autostart would fail otherwise.
fixes #887
tags/2.0.0-beta
Carsten Brandt 11 years ago
parent
commit
b8ffee6559
  1. 2
      framework/yii/web/CacheSession.php

2
framework/yii/web/CacheSession.php

@ -42,13 +42,13 @@ class CacheSession extends Session
*/
public function init()
{
parent::init();
if (is_string($this->cache)) {
$this->cache = Yii::$app->getComponent($this->cache);
}
if (!$this->cache instanceof Cache) {
throw new InvalidConfigException('CacheSession::cache must refer to the application component ID of a cache object.');
}
parent::init();
}
/**

Loading…
Cancel
Save