Browse Source

removed unused property from Session

cleanup after #1479
tags/2.0.0-beta
Carsten Brandt 11 years ago
parent
commit
ac3967cab7
  1. 8
      framework/yii/web/Session.php

8
framework/yii/web/Session.php

@ -112,19 +112,15 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
return false;
}
private $_opened = false;
/**
* Starts the session.
*/
public function open()
{
if (session_status() == PHP_SESSION_ACTIVE) {
$this->_opened = true;
return;
}
if (!$this->_opened) {
if ($this->getUseCustomStorage()) {
@session_set_save_handler(
[$this, 'openSession'],
@ -141,23 +137,19 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
@session_start();
if (session_id() == '') {
$this->_opened = false;
$error = error_get_last();
$message = isset($error['message']) ? $error['message'] : 'Failed to start session.';
Yii::error($message, __METHOD__);
} else {
$this->_opened = true;
$this->updateFlashCounters();
}
}
}
/**
* Ends the current session and store session data.
*/
public function close()
{
$this->_opened = false;
if (session_id() !== '') {
@session_write_close();
}

Loading…
Cancel
Save