Ticket #660 (closed Bug: fixed)
Explicitly calling Session::create() alternately re-creates and destroys session
| Reported by: | edam | Owned by: | Shadowhand |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.2 |
| Component: | Libraries:Session | Version: | SVN HEAD |
| Keywords: | Cc: |
Description
With a clean installation of SVN head's trunk and the following code in application/controllers/welcome.php:
class Welcome_Controller extends Controller {
public function __construct() {
$this->session = new Session;
}
public function index() {
$this->session->create();
}
}
and application/config/session.php's driver set to "database", the following behaviour can be observed:
First request:
- a new session is created in the database's session table
- a cookie is returned to the browser with the correct session id
Second request:
- the previous session's cookie is destroyed
- a new session is NOT created in the database
- a new cookie is NOT given to the browser
- At this point there is no session!
Further requests produce exactly the same results as the first and second alternately.
Change History
Note: See
TracTickets for help on using
tickets.
