Commit ec05c0ea by Qiang Xue

typo fix.

parent b9743ef6
...@@ -127,6 +127,7 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co ...@@ -127,6 +127,7 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
@session_start(); @session_start();
if ($this->getIsActive()) { if ($this->getIsActive()) {
Yii::info('Session started', __METHOD__);
$this->updateFlashCounters(); $this->updateFlashCounters();
} else { } else {
$error = error_get_last(); $error = error_get_last();
...@@ -204,7 +205,7 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co ...@@ -204,7 +205,7 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
if ($this->_hasSessionId === null) { if ($this->_hasSessionId === null) {
$name = $this->getName(); $name = $this->getName();
$request = Yii::$app->getRequest(); $request = Yii::$app->getRequest();
if (ini_get('session.use_cookie') && $request->getCookies()->getValue($name) !== null) { if (ini_get('session.use_cookies') && !empty($_COOKIE[$name])) {
$this->_hasSessionId = true; $this->_hasSessionId = true;
} elseif (!ini_get('use_only_cookies') && ini_get('use_trans_sid')) { } elseif (!ini_get('use_only_cookies') && ini_get('use_trans_sid')) {
$this->_hasSessionId = $request->get($name) !== null; $this->_hasSessionId = $request->get($name) !== null;
......
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