Commit 7b032338 by Alexander Makarov

Merge pull request #1479 from DaSourcerer/session-cleanup

Removed compatibility code for PHP < 5.4 in yii\web\Session
parents eab7e4a2 97645bcf
......@@ -179,13 +179,7 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
*/
public function getIsActive()
{
if (function_exists('session_status')) {
// available in PHP 5.4.0+
return session_status() == PHP_SESSION_ACTIVE;
} else {
// this is not very reliable
return $this->_opened && session_id() !== '';
}
return session_status() == PHP_SESSION_ACTIVE;
}
/**
......
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