Commit b751211d by Qiang Xue

fixed implementation of Session::getHasSessionId().

parent 168b37eb
...@@ -201,6 +201,9 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co ...@@ -201,6 +201,9 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
*/ */
public function getHasSessionId() public function getHasSessionId()
{ {
if ($this->getIsActive()) {
return true;
}
if ($this->_hasSessionId === null) { if ($this->_hasSessionId === null) {
$name = $this->getName(); $name = $this->getName();
$request = Yii::$app->getRequest(); $request = Yii::$app->getRequest();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment