Skip to content

Commit

Permalink
moved CacheSession::init() parent call after init of cache component
Browse files Browse the repository at this point in the history
session autostart would fail otherwise.
fixes yiisoft#887
  • Loading branch information
cebe committed Sep 18, 2013
1 parent c2a3aa3 commit b8ffee6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion framework/yii/web/CacheSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

/**
Expand Down

0 comments on commit b8ffee6

Please sign in to comment.